-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathREADME
More file actions
206 lines (167 loc) · 5.75 KB
/
README
File metadata and controls
206 lines (167 loc) · 5.75 KB
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
This is a mirror of http://www.vim.org/scripts/script.php?script_id=670
The visincr plugin facilitates making a column of increasing or decreasing
numbers, dates, or daynames.
First, select a column using visual-block (ctrl-v) and move the cursor.
Second, choose what sort of incremented list you want:
:I [#] Will use the first line's number as a starting point to build
a column of increasing numbers (or decreasing numbers if the
increment is negative).
Default increment: 1
Justification : left (will pad on the right)
:II [# [zfill]] Will use the first line's number as a starting point
to build a column of increasing numbers (or decreasing numbers
if the increment is negative).
Default increment: 1
Justification : right (will pad on the left)
Zfill : left padding will be done with the given
character, typically a zero.
:IYMD [#] year/month/day
:IMDY [#] month/day/year
:IDMY [#] day/month/year
Will use the starting line's date to construct an increasing
or decreasing list of dates, depending on the sign of the
number.
Default increment: 1 (in days)
:ID [#] Will produce an increasing/decreasing list of daynames. Three-letter
daynames will be used if the first day on the first line is a three
letter dayname; otherwise, full names will be used.
:IO [#]
:IIO [#] [zfill]
Like :I and :II, except visincr creates octal numbers.
:IR [#]
:IIR [#] [zfill]
Like :I and :II, except visincr uses Roman numerals. Negative and
zero counts are not supported for Roman numerals.
:IX [#]
:IIX [#] [zfill]
Like :I and :II, except visincr creates hexadecimal numbers.
-------------------
EXTRA NOTES
-------------------
For :I :II :IO :IIO :IR :IIR :
If the visual block is ragged on the right-hand side (as can
easily happen when the "$" is used to select the
right-hand-side), the block will have spaces appended to
straighten it out. If the string length of the count exceeds
the visual-block, then additional spaces will be inserted as
needed. Leading tabs are handled by using virtual column
calculations.
For :IR and :IIR :
Since Roman numerals vary considerably in their lengths for
nearby numbers, an additional two spaces will be included.
For :IYMD, :IMDY, and IDMY:
You'll need the <calutil.vim> plugin, available as
"Calendar Utilities" under the following url:
http://mysite.verizon.net/astronaut/vim/index.html#CALUTIL
Help is included, too -- check out :he visincr-examples to see
even more examples of each command in action.
Examples:
:I
Use ctrl-V to
Original Select, :I
8 8
8 9
8 10
8 11
8 12
:I -1
Use ctrl-V to
Original Select, :I -1
8 8
8 7
8 6
8 5
8 4
:II
Use ctrl-V to
Original Select, :II
8 8
8 9
8 10
8 11
8 12
:II -1
Use ctrl-V to
Original Select, :II -1
8 8
8 7
8 6
8 5
8 4
:IMDY
Use ctrl-V to
Original Select, :IMDY
06/10/03 6/10/03
06/10/03 6/11/03
06/10/03 6/12/03
06/10/03 6/13/03
06/10/03 6/14/03
:IYMD
Use ctrl-V to
Original Select, :IYMD
03/06/10 03/06/10
03/06/10 03/06/11
03/06/10 03/06/12
03/06/10 03/06/13
03/06/10 03/06/14
:IDMY
Use ctrl-V to
Original Select, :IDMY
10/06/03 10/06/03
10/06/03 11/06/03
10/06/03 12/06/03
10/06/03 13/06/03
10/06/03 14/06/03
:ID
Use ctrl-V to
Original Select, :ID
Sun Sun
Sun Mon
Sun Tue
Sun Wed
Sun Thu
:ID
Use ctrl-V to
Original Select, :ID
Sunday Sunday
Sunday Monday
Sunday Tuesday
Sunday Wednesday
Sunday Thursday
:IA
Use ctrl-V to
Original Select, :IA
a a
a b
a c
a d
a e
:IO
Use ctrl-V to
Original Select, :IO
5 5
5 6
5 7
5 10
5 11
:IR
Use ctrl-V to
Original Select, :IR
II II
II III
II IV
II V
II VI
Use ctrl-V to
Original Select, :IX
8 8
8 9
8 a
8 b
8 c
-------------
SEE ALSO
-------------
vis : vimscript#1195 : apply any ex command (ex. :s/../../) to a visual block
vissort : vimtip#588 : how to sort a visual block (or sort based on one)
visincr : http://mysite.verizon.net/astronaut/vim/index.html#VISINCR (for the latest, albeit experimental, release)