Vim Zen-coding expansion for slim and haml templating languages
After installing the vim-zencoding plugin, drop this in your ~/.vimrc:
let g:user_zen_settings = {
\ 'haml': {
\ 'extends': 'html',
\ },
\ 'slim': {
\ 'extends': 'html',
\ },
\}
(Note that the \ are required)
And then, open a .slim file and type this:
html:5
And in insert mode, hit <ctrl-y>,. (Control + y, and a comma). Boom.
( Works if you haven't changed your default key-map )
In case you feel hitting <ctrl-y> is too clumsy, you could remap that using:
let g:user_zen_leader_key='<c-e>'
With this setting inside your ~/.vimrc, you can achieve the expansion using <ctrl-e>, (Control + e, and a comma)
Written by Kashyap
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Haml
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#