Last Updated: October 23, 2019
·
10.41K
· junereycasuga

Using Tab key as abbreviation expander on Emmet.vim

For those who are using Sublime Text as their primary text editor and migratred to Vim, you might found using Emmet on Vim is kind of hard. But, you can still set the <Tab> key when expanding abbreviation on your Vim using Emmet.vim by adding this line on your .vimrc:

let g:user_emmet_expandabbr_key='<Tab>'

But the problem with this is, it prevents you to use <Tab> key for indention. But of course, there is still a work around on this by using the code below instead of the one above:

imap <expr> <tab> emmet#expandAbbrIntelligent("\<tab>")

5 Responses
Add your response

Glad to help :)

over 1 year ago ·

like a charm! really thanks!

over 1 year ago ·

Works like a charm! :)
Thanks a lot

over 1 year ago ·

Thanks a lot. Exactly that was looking for THX!!!

over 1 year ago ·

Only one problem, it doesn't seem to like inserting multiple tabs, e.g. the second time you press tab it removes the tab again.

over 1 year ago ·