-
-
Notifications
You must be signed in to change notification settings - Fork 207
/
Copy pathunimpaired.txt
138 lines (107 loc) · 4.7 KB
/
unimpaired.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
*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|
*[f*
[f Go to the file preceding the current one
alphabetically in the current file's directory.
*]f*
]f Go to the file succeeding the current one
alphabetically in the current file's directory.
*[n*
[n Go to the previous SCM conflict marker. Try d[n
inside a conflict.
*]n*
]n Go to the next SCM conflict marker. 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
*[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"> => <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*
[y{motion} C String encode. Backslash escape control
[yy characters, quotation marks, and backslashes.
{Visual}[y
*]y* *]yy* *v_]y*
]y{motion} C String decode.
]yy
{Visual}]y
TODO *unimpaired-todo*
Avoid munging null characters when encoding and decoding.
vim:tw=78:et:ft=help:norl: