easymotion / vim-easymotion

Vim motions on speed!
http://www.vim.org/scripts/script.php?script_id=3526
7.5k stars 362 forks source link

:EMCommandLineNoreMap isn't available during vimrc evaluation #356

Closed ELLIOTTCABLE closed 6 years ago

ELLIOTTCABLE commented 6 years ago

Forgive me if this is completely obvious to everyone else, as perhaps I'm just a bit of a vim-noob …

… but why is :EMCommandLineNoreMap available at runtime, but explodes if I try to include it in my .vimrc?

Error detected while processing /Users/ec/.vimrc:
line  197:                                                                                                 
E492: Not an editor command: EMCommandLineNoreMap <Space> <CR>
ELLIOTTCABLE commented 6 years ago

I moved this into an autocmd, and it solved the issue — I believe this may be worth mentioning in the docs:

augroup easymotion-keymap | au!
   au VimEnter * EMCommandLineNoreMap <Space> <CR>
augroup END