paste_open.vim : Mapping targets for opening new lines in paste mode
| script karma |
Rating 23/7,
Downloaded by 870 |
Comments, bugs, improvements
|
Vim wiki
|
| created by |
| Tom Ryder |
| |
| script type |
| utility |
| |
| description |
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.
https://dev.sanctum.geek.nz/cgit/vim-paste-open.git |
| |
| install details |
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) |
| |
script versions (upload new version)
Click on the package to download.
ip used for rating: 216.73.216.44
|