emmet-vim
emmet-vim copied to clipboard
How to fix “E492: Not an editor command: EmmetInstall”?
I have installed emmet-vim and all worked good. When I added this in vimrc:
let g:user_emmet_install_global = 0 autocmd FileType html,css EmmetInstall
there appeared next error:
Error detected while processing FileType Auto commands for "html": E492: Not an editor command: EmmetInstall
There is my vimrc:
" If using a dark background within the editing area and syntax highlighting " turn on this option as well "set background=dark
" Uncomment the following to have Vim jump to the last position when " reopening a file "if has("autocmd") " au BufReadPost * if line("'"") > 1 && line("'"") <= line("$") | exe "normal! g'"" | endif "endif
" Uncomment the following to have Vim load indentation rules and plugins " according to the detected filetype. "if has("autocmd") " filetype plugin indent on "endif
" The following are commented out as they cause vim to behave a lot " differently from regular Vi. They are highly recommended though. "set showcmd " Show (partial) command in status line. "set showmatch " Show matching brackets. "set ignorecase " Do case insensitive matching "set smartcase " Do smart case matching "set incsearch " Incremental search "set autowrite " Automatically save before commands like :next and :make "set hidden " Hide buffers when they are abandoned "set mouse=a " Enable mouse usage (all modes)
" Source a global configuration file if available if filereadable("/etc/vim/vimrc.local") source /etc/vim/vimrc.local endif
let g:user_emmet_install_global = 0 autocmd FileType html,css EmmetInstall
Had the same problem. It seems that autocmd with EmmetInstall issued before actual vim-emmet loading so it lead to error. In my case I moved autocmd line below the 'call plug#end()' line (I use VimPlug) and error message disappered
Thats is also happening with me, but I am not using any plugin manager so I don't know if that is the cause
What plugin manager do you use?
I, too, have let g:user_emmet_install_global = 0
, but I have EmmetInstall
in various ftplugin files for the file types I'm using emmet for.
Do you happen to be using neovim, because I noticed that I get this error now in neovim, but not vim.
just like this