Reputation: 1316
I am attempting to get the mattn/emmet-vim plugin working with the configuration I read in this article: https://drivy.engineering/setting-up-vim-for-react/
call plug#begin('~/.vim/plugged')
Plug 'pangloss/vim-javascript'
Plug 'mxw/vim-jsx'
Plug 'mattn/emmet-vim'
call plug#end()
let g:user_emmet_leader_key='<Tab>'
let g:user_emmet_settings = {
\ 'javascript.jsx' : {
\ 'extends' : 'jsx',
\ },
\}
I put the above in my ~/.vimrc
. Then ran Vim and installed the plugin with :PlugInstall.
But based on the docs and that article I should now be able to go into insert mode and type
h2.myHeader
+ <Tab>
and it should turn into <h2 className='myHeader'></h2>
But I'm not seeing it. Is there something I'm missing?
Upvotes: 0
Views: 1811
Reputation: 313
You actually need to type Tab
and then ,
(comma) to trigger the expansion.
Thanks for asking this, the formatting in the article is a bit weird, so i'll update to avoid other people being confused. :)
Upvotes: 1