I have the following in my init.vim
:
nnoremap K \% " Swap K with % in [n]ormal mode
vnoremap K \% " Swap K with % in [v]isual mode
xnoremap K \% " Swap K with % in [V]isual mode
nnoremap \% K " Swap % with K in [n]ormal mode
vnoremap \% K " Swap % with K in [v]isual mode
xnoremap \% K " Swap % with K in [V]isual mode
All I want is to change the default code block selection which is %
by default to K
(Shift k), but it's not working.
I have escaped the %
with \%
and it's not working. I also tried normal %
and it didn't work either. But whenever I move my cursor on a {
and then press K
(Shift k) then Neovim freezes.
How can I remap this key?
I'm using Neovim.
vim -i NONE -u NONE
and executing your mapping in the command line (or using the%so
command) or withvim --clean