Annoyed that the Perl debugger thinks each entered line should be immediately evaluated? It's hard to paste in a multi-line sub definition that way. Add escape-newlines.vim
into ~/.vimrc
.
How it works:
- visually-select multiple lines
- Type
"+\e
. (If yourmapleader
is set to something else, use it instead of\
). - The contents of your clipboard will now be the selected lines with
\
appended to each.
- It won't affect your buffer.
- It supports yanking into arbitrary registers.