paste_open.vim : Mapping targets for opening new lines in paste mode
| script karma
Downloaded by 465
Comments, bugs, improvements
script versions (upload new version)
|This plugin provides mapping targets for opening new lines in insert mode, above or below the cursor position (same as O and o), but precedes them with a :set paste. It restores that option's previous value once the insert operation finishes. This makes a "one-shot paste".
The excellent unimpaired.vim, vimscript #1590, provides pretty much the same mapping. However, newer versions of that plugin deprecated the two-key binding I liked, and I wanted something simpler without loading all the other bindings that I never used anyway.
|Drop plugin/paste_open.vim in your ~/.vim/plugin directory. Add doc/paste_open.txt in ~/.vim/doc if you want the help file. Otherwise, use your favourite Vim plugin package manager.
The author uses the mappings like this in his .vimrc:
nmap \o <Plug>(PasteOpenBelow)
nmap \O <Plug>(PasteOpenAbove)
To get the old unimpaired.vim bindings back, you might do this:
nmap yo <Plug>(PasteOpenBelow)
nmap yO <Plug>(PasteOpenAbove)
Click on the package to download.
ip used for rating: 220.127.116.11