mattn / mattn/emmet-vim

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

Open
#451 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
6.5k
Forks
414
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the vimrc configuration shown in the issue and verify when emmet-vim is loaded relative to the FileType autocmd for html and css. Confirm whether :EmmetInstall is available at that point, then reproduce the configuration and verify that the E492 error no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, vim
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.