emmet-vim icon indicating copy to clipboard operation
emmet-vim copied to clipboard

How to fix “E492: Not an editor command: EmmetInstall”?

Open inikolaesku opened this issue 5 years ago • 5 comments

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

inikolaesku avatar Apr 13 '19 15:04 inikolaesku

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

widgetii avatar Jun 21 '19 10:06 widgetii

Thats is also happening with me, but I am not using any plugin manager so I don't know if that is the cause

igorcmelo avatar Apr 13 '21 02:04 igorcmelo

What plugin manager do you use?

mattn avatar Apr 17 '21 12:04 mattn

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.

jmcantrell avatar Apr 18 '22 21:04 jmcantrell

just like this

Screenshot_2023-06-04_23-46-05

FarikunAziz avatar Jun 04 '23 16:06 FarikunAziz