Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: a029dc28eb
139 lines (107 sloc) 4.817 kB
*unimpaired.txt* Pairs of handy bracket mappings
Author: Tim Pope <>
License: Same terms as Vim itself (see |license|)
This plugin is only available if 'compatible' is not set.
INTRODUCTION *unimpaired*
This plugin provides several pairs of bracket maps.
NEXT AND PREVIOUS *unimpaired-next*
The following maps all correspond to normal mode commands. If a count is
given, it becomes an argument to the command. A mnemonic for the "a" commands
is "args" and for the "q" commands is "quickfix".
*[a* |:previous|
*]a* |:next|
*[A* |:first|
*]A* |:last|
*[b* |:bprevious|
*]b* |:bnext|
*[B* |:bfirst|
*]B* |:blast|
*[l* |:lprevious|
*]l* |:lnext|
*[L* |:lfirst|
*]L* |:llast|
*[<C-L>* |:lpfile|
*]<C-L>* |:lnfile|
*[q* |:cprevious|
*]q* |:cnext|
*[Q* |:cfirst|
*]Q* |:clast|
*[<C-Q>* |:cpfile| (Note that <C-Q> only works in a terminal if you disable
*]<C-Q>* |:cnfile| flow control: stty -ixon)
*[t* |:tprevious|
*]t* |:tnext|
*[T* |:tfirst|
*]T* |:tlast|
[f Go to the file preceding the current one
alphabetically in the current file's directory.
]f Go to the file succeeding the current one
alphabetically in the current file's directory.
[n Go to the previous SCM conflict marker. Try d[n
inside a conflict.
]n Go to the next SCM conflict marker. Try d]n inside a
LINE OPERATIONS *unimpaired-lines*
[<Space> Add [count] blank lines above the cursor.
]<Space> Add [count] blank lines below the cursor.
*[e* *v_[e*
[e Exchange the current line with [count] lines above it.
*]e* *v_]e*
]e Exchange the current line with [count] lines below it.
OPTION TOGGLING *unimpaired-toggling*
On Off Toggle Option
*[oc* *]oc* *coc* 'cursorline'
*[od* *]od* *cod* 'diff' (actually |:diffthis| / |:diffoff|)
*[oh* *]oh* *coh* 'hlsearch'
*[oi* *]oi* *coi* 'ignorecase'
*[ol* *]ol* *col* 'list'
*[on* *]on* *con* 'number'
*[or* *]or* *cor* 'relativenumber'
*[os* *]os* *cos* 'spell'
*[ou* *]ou* *cou* 'cursorcolumn'
*[ow* *]ow* *cow* 'wrap'
*[ox* *]ox* *cox* 'cursorline' 'cursorcolumn' (x as in crosshairs)
*yp* *yP* *yo* *yO* *yI* *yA*
A toggle has not been provided for 'paste' because the typical use case of
wrapping of a solitary insertion is so wasteful: You toggle twice, but
you only paste once (YOPO). Instead, press yp or yP to invoke |a| or |i| with
'paste' already set. Leaving insert mode sets 'nopaste' automatically. You
can also use yo, yO, yI, or yA to do the same operation with |o|, |O|,
|I|, or |A|.
ENCODING AND DECODING *unimpaired-encoding*
Each of these operations has a map that takes a motion, a map that
targets [count] lines, and a visual mode map. The linewise variant integrates
with repeat.vim.
Mnenomic: encoding always comes before decoding; "[" always comes before "]".
*[x* *[xx* *v_[x*
[x{motion} XML encode.
[xx <foo bar="baz"> => &lt;foo bar=&quot;baz&quot;&gt;
*]x* *]xx* *v_]x*
]x{motion} XML decode. HTML entities are handled as well.
*[u* *[uu* *v_[u*
[u{motion} URL encode.
[uu foo bar => foo%20bar
*]u* *]uu* *v_]u*
]u{motion} URL decode.
*[y* *[yy* *v_[y*
[y{motion} C String encode. Backslash escape control
[yy characters, quotation marks, and backslashes.
*]y* *]yy* *v_]y*
]y{motion} C String decode.
TODO *unimpaired-todo*
Avoid munging null characters when encoding and decoding.
Jump to Line
Something went wrong with that request. Please try again.