easymotion / vim-easymotion

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

Only use one easymotion binding #384

Closed philiplinell closed 6 years ago

philiplinell commented 6 years ago

Hello!

I'm having some trouble binding easymotion. What I'm trying to do is to bind only <Leader><Leader>to easymotion-s. I would like to disable all other bindings since I like to keep my bindings to only those I use.

This is what I have in my vimrc related to EasyMotion:

" easymotion
let g:EasyMotion_smartcase = 1
let g:EasyMotion_keys = 'abcdefghijklmnopqrstuvwxyz'
" Disable default mappings
let g:EasyMotion_do_mapping=0
nmap <LEADER><LEADER> <Plug>(easymotion-s)

If I now press <LEADER><LEADER>E I get no suggestions as to jump to a word that starts with E. I get the message on-prefix) written in the vim status line.

Is it possible to do what I want using easymotion?

philiplinell commented 6 years ago

After some more tinkering, it seems that Easymotion is doing what I want. Not sure if it was some stray whitespace in my .vimrc or something else, but now it's working as intended (although I'm using (easymotion-overwin-f) instead of (easymotion-s). By setting EasyMotion_do_mapping to anything else than 1 no default bindings get created, as can be seen here https://github.com/easymotion/vim-easymotion/blob/master/plugin/EasyMotion.vim#L237.

Thanks for your work with this plugin, and sorry for the noise.