I am wondering if it is possible to expand shorthand HAML in a Zencoding-like-way in Vim. For instance, I use Vundle in my .vimrc file and have haml plugin installed. So something like :
#main.stuff>h1.title+h2.subtitle+p|haml
Is it possible in Vim to trigger above code to expand to :
#main.stuff
%h1.title
%h2.subtitle
%p
For writing zen-coding style in vim there is already a dedicated vim plugin called emmet-vim.
From its documentation:
Of course if filetype is haml there is no need to apply filtering. Following expression will also expand to desired snippet of code:
will expand to: