unimpaired.vim : Pairs of handy bracket mappings
| script karma
Downloaded by 5159
Comments, bugs, improvements
script versions (upload new version)
|Much of unimpaired.vim was extracted from my vimrc when I noticed a pattern: complementary pairs of mappings. They fall into three categories.
There are mappings which are simply short normal mode aliases for commonly used ex commands. ]q is :cnext. [q is :cprevious. ]a is :next. [b is :bprevious. See the documentation for the full set of 16 mappings and mnemonics. All of them take a count.
There are linewise mappings. [<Space> and ]<Space> add newlines before and after the cursor line. [e and ]e exchange the current line with the one above or below it.
There are mappings for toggling options. [os, ]os, and =os perform :set spell, :set nospell, and :set invspell, respectively. There's also l (list), n (number), w (wrap), x (cursorline cursorcolumn), and several others, plus mappings to help alleviate the set paste dance. Consult the documentation.
There are mappings for encoding and decoding. [x and ]x encode and decode XML (and HTML). [u and ]u encode and decode URLs. [y and ]y do C String style escaping.
Oh, and there's also [f and ]f to go to the previous/next file in the directory, and [n and ]n to go between SCM conflict markers.
|Unzip in ~/.vim (~\vimfiles on Windows). Use :helptags ~/.vim/doc to enable :help.|
Click on the package to download.
ip used for rating: 188.8.131.52
||Provide <Plug> maps for all built-ins.
Never override user maps with Unimpaired maps.
Call :colder/:cnewer when invoking [f/]f in quickfix window.
Provide 'colorcolumn' option maps on [ot/]ot/yot.
Support [n/]n in visual mode.
Handle count on [A/]A/[B/]B.
Make URL encoding Unicode safe.
XML encode ' (apostrophe) as '.
||Drop deprecated [o and ]o aliases for [f and ]f.
Map [o, ]o, and yo to enable, disable, and toggle options.
Map [op, ]op, and yop to enable paste mode for one insert.
Map [p, ]p, [P, and ]P to force line-wise paste.
Map <p, <P, >p, >P, =p, and =P as re-indenting paste maps.
Map [<C-T> and ]<C-T> as :ptprevious and :ptnext.
||Add repeat.vim support.
Add [t and ]t for :tprev and :tnext.
Add [n and ]n for jumping between conflict markers.
Add [<C-Q> and ]<C-Q> for :cpfile and :cnfile.
Add [<C-L> and ]<C-L> for :lpfile and :lnfile.
Deprecate [o and ]o in favor of new maps [f and ]f.
Improve robustness of [f and ]f.
Improve robustness of [e and ]e.
Fix unescaping of "\a" and "\$".
Work around `unnamedplus' in clipboard.
Expose API for custom encoding algorithms.
||Add <Plug> aliases for all mappings.
Skip swap files with ]o and [o.
Accept a count with [e and ]e.