_uhrxw
Last Updated: April 25, 2017
·
6.539K
· 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>")

6 Responses
Add your response

16993

Thank you this was really helpful!

over 1 year ago ·
16994

Glad to help :)

over 1 year ago ·
18257

like a charm! really thanks!

over 1 year ago ·
18661

Works like a charm! :)
Thanks a lot

over 1 year ago ·
22152

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

over 1 year ago ·
22828

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 ·