| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- *unimpaired.txt* Pairs of handy bracket mappings
- Author: Tim Pope <http://tpo.pe/>
- 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|
- *[<C-T>* |:ptprevious|
- *]<C-T>* |:ptnext|
- *[f*
- [f Go to the file preceding the current one
- alphabetically in the current file's directory. In
- the quickfix window, equivalent to |:colder|.
- *]f*
- ]f Go to the file succeeding the current one
- alphabetically in the current file's directory. In
- the quickfix window, equivalent to |:cnewer|.
- *[n*
- [n Go to the previous SCM conflict marker or diff/patch
- hunk. Try d[n inside a conflict.
- *]n*
- ]n Go to the next SCM conflict marker or diff/patch hunk.
- Try d]n inside a conflict.
- LINE OPERATIONS *unimpaired-lines*
- *[<Space>*
- [<Space> Add [count] blank lines above the cursor.
- *]<Space>*
- ]<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
- *[ob* *]ob* *yob* 'background' (dark is off, light is on)
- *[oc* *]oc* *yoc* 'cursorline'
- *[od* *]od* *yod* 'diff' (actually |:diffthis| / |:diffoff|)
- *[oh* *]oh* *yoh* 'hlsearch'
- *[oi* *]oi* *yoi* 'ignorecase'
- *[ol* *]ol* *yol* 'list'
- *[on* *]on* *yon* 'number'
- *[or* *]or* *yor* 'relativenumber'
- *[os* *]os* *yos* 'spell'
- *[ot* *]ot* *yot* 'colorcolumn' ("+1" or last used value)
- *[ou* *]ou* *you* 'cursorcolumn'
- *[ov* *]ov* *yov* 'virtualedit'
- *[ow* *]ow* *yow* 'wrap'
- *[ox* *]ox* *yox* 'cursorline' 'cursorcolumn' (x as in crosshairs)
- The mnemonic for y is that if you tilt it a bit it looks like a switch.
- *<s* *>s* *=s*
- Alternative prefixes for on/off/toggle: <s, >s, =s.
- PASTING *unimpaired-pasting*
- These are experimental:
- *>p* Paste after linewise, increasing indent.
- *>P* Paste before linewise, increasing indent.
- *<p* Paste after linewise, decreasing indent.
- *<P* Paste before linewise, decreasing indent.
- *=p* Paste after linewise, reindenting.
- *=P* Paste before linewise, reindenting.
- |]p|, |[p|, |[P|, and |]P| have also been remapped to force linewise pasting,
- while preserving their usual indent matching behavior.
- *[op* *]op* *yop*
- A toggle has not been provided for 'paste' because the typical use case of
- wrapping of a solitary insertion is inefficient: You toggle twice, but
- you only paste once (YOPO). Instead, press [op, ]op, or yop to invoke |O|,
- |o|, or |0||C| with 'paste' already set. Leaving insert mode sets 'nopaste'
- automatically.
- 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.
- Mnemonic: encoding always comes before decoding; "[" always comes before "]".
- *[x* *[xx* *v_[x*
- [x{motion} XML encode.
- [xx <foo bar="baz"> => <foo bar="baz">
- {Visual}[x
- *]x* *]xx* *v_]x*
- ]x{motion} XML decode. HTML entities are handled as well.
- ]xx
- {Visual}]x
- *[u* *[uu* *v_[u*
- [u{motion} URL encode.
- [uu foo bar => foo%20bar
- {Visual}[u
- *]u* *]uu* *v_]u*
- ]u{motion} URL decode.
- ]uu
- {Visual}]u
- *[y* *[yy* *v_[y* *[C* *[CC* *v_[C*
- [y{motion} C String encode. Backslash escape control
- [yy characters, quotation marks, and backslashes.
- {Visual}[y
- [C{motion}
- [CC
- {Visual}[C
- *]y* *]yy* *v_]y* *]C* *]CC* *v_]C*
- ]y{motion} C String decode.
- ]yy
- {Visual}]y
- ]C{motion}
- ]CC
- {Visual}]C
- vim:tw=78:et:ft=help:norl:
|