3 ms·
These can be convenient if you are only entering text manually. But remapping regular -- albeit rare -- text sequences can have unexpected results when pasting
by jcl 10y ago
These can be convenient if you are only entering text manually. But remapping regular -- albeit rare -- text sequences can have unexpected results when pasting copied content into insert mode in a terminal window. I've been bitten by this a couple times when pasting base64-encoded data.
- nick_g 10y agoThis has caught me as well, but it can be avoided by using `:set paste!` to toggle paste mode before pasting. This isn't something I need to worry about often enough but you can map that command if pasting external content is something you do often.
- marklgr 10y agoMost terminals support bracketed paste, and vim can automatically toggle pastemode based on the special sequences. Eg. https://github.com/ConradIrwin/vim-bracketed-paste https://github.com/ConradIrwin/vim-bracketed-paste