Closed jwav closed 3 years ago
@jwav Hi! Thanks for raising this question. The correct way to remap is to use <Plug>(sneak-s)
try it!
Hi, thank you for answering ; what would the exact nnoremap
syntax be ?
I've tried nnoremap <a-s> <Plug>(sneak-s)
but as expected it just executes <
+ P
+ l
...
I've also tried prefacing it with :
: nnoremap <a-s> :<Plug>(sneak-s)
, nnoremap <a-s> :<Plug>(sneak-s)<CR>
, many variations to no avail. PyCharm displays the following error in the lower bar: VIM - Not an editor command: <Plug | <Plug>(sneak-s)
I use PyCharm Community 2020.3.2 on Windows 10, with IdeaVim 0.64 and IdeaVim-Sneak 1.1.1
@jwav Using nmap
instead of nnoremap
work for me just fine
full syntax is:
nmap <a-s> <Plug>(sneak-s)
Holy mackerel, it worked 😄 I have no idea why it doesn't work with nnoremap, though. Thanks a lot, Mishkun
You are welcome!
How did you manage to restore the s
to its original behaviour? Normally I would just add unmap s
to .ideavimrc
. This works when I run :unmap s
manually but I guess since the plugin is loaded after the defaults are set it ends up gets remapped.
To restore 's' to its original VIM behaviour : :nmap s s
I'm quite used to using 's' to replace a single character. Is there a way to remap 's' in IdeaVim ? In regular Vims, one would use
nnoremap <a-s> <Plug>Sneak_s
, but it doesn't work in PyCharm.SOLUTION: Use
nmap <a-s> <Plug>(sneak-s)
. Note:nnoremap
does not work.