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

`Alt-f` and `Alt-F` in insert mode didn't reset `;` and `,` #282

Closed bruhtus closed 3 years ago

bruhtus commented 3 years ago

First of all, thank you for making this great plugin. It was more accurate than something like easymotion.

I have a problem when using Alt-f and Alt-F (and probably with Alt-t and Alt-T) in insert mode. I didn't remap Alt-f and Alt-F so it should behave like Esc-f and Esc-F by default (more info :h i_ALT).

Here's an example scenario:

I already set g:sneak#f_reset and g:sneak#t_reset to 1, but still no avail.

So, can I disable ; and , without making a new mapping? i mean making a mapping like:

nnoremap ; ;
nnoremap , ,

or

nmap <expr> ; sneak#is_sneaking() ? ';' : ';'
nmap <expr> , sneak#is_sneaking() ? ',' : ','

would be funny, or maybe I should do something like this:

nnoremap <Plug>Sneak_; <Nop>
nnoremap <Plug>Sneak_, <Nop>

instead? Is there something that I'm missing?

Thank you.

bruhtus commented 3 years ago

According to https://github.com/justinmk/vim-sneak/pull/248, it seems like I need to map <Plug>Sneak_; and <Plug>Sneak_, to another key.