justinmk / vim-sneak

The missing motion for Vim :athletic_shoe:
http://www.vim.org/scripts/script.php?script_id=4809
MIT License
3.24k stars 88 forks source link

Swapping ; with , makes repeating unusable #281

Closed Infrasonics closed 3 years ago

Infrasonics commented 3 years ago

My config has the following lines since ; is <S-,> in my keyboard layout.

nnoremap ; ,
nnoremap , ;
vnoremap ; ,
vnoremap , ;

Unfortunately this breaks the repetition of a sneak search; simply nothing happens pressing either of these keys. Is there a workaround to get forward repeat with , and backwards with ;?

justinmk commented 3 years ago

see https://github.com/justinmk/vim-sneak/issues/282

because of vim limitations, sneak can't "listen" to mappings, and removing/replacing your existing maps is also impossible to do reliably. So if you have mapped ; or , then sneak won't attempt its temporary ; and , mappings.

You need to...

  1. remove your nnoremap ... maps
  2. map <Plug>Sneak_; and <Plug>Sneak_, explicitly:
map , <Plug>Sneak_;
map ; <Plug>Sneak_,
Infrasonics commented 3 years ago

Thank you, this works great^^.