Is there a possibility to remap in paste mode.
For example, I remapped jk to <ESC> in insert mode with inoremap jk <esc>, so I can easily exit normal mode. But when I'm in paste mode with :pastetoggle my remapping does not work anymore. I looked for the help with :help map-modes but could not find anything related to the paste mode.
From :help 'paste':
[...]
When the 'paste' option is switched on (also when it was already on):
- mapping in Insert mode and Command-line mode is disabled
[...]
One workaround to the fact that remappings don't work in paste mode is to use vim-unimpaired's yo and yOcommands to paste. At least this way leaving insert mode with paste set will also set nopaste and you won't find yourself in paste mode when you don't want to be as much.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With