comparison runtime/doc/motion.txt @ 39:c16898406ff2

synchorinize version 7.3.081
author one@zeus.cr.ie.u-ryukyu.ac.jp
date Fri, 17 Dec 2010 17:43:06 +0900
parents e170173ecb68
children 67300faee616
comparison
equal deleted inserted replaced
38:e06a1cd7230d 39:c16898406ff2
1 *motion.txt* For Vim version 7.2. Last change: 2008 Aug 03 1 *motion.txt* For Vim version 7.3. Last change: 2010 May 14
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
149 position before and after the motion. 149 position before and after the motion.
150 150
151 ============================================================================== 151 ==============================================================================
152 2. Left-right motions *left-right-motions* 152 2. Left-right motions *left-right-motions*
153 153
154 These commands move the cursor to the specified column in the current line.
155 They stop at the first column and at the end of the line, except "$", which
156 may move to one of the next lines. See 'whichwrap' option to make some of the
157 commands move across line boundaries.
158
154 h or *h* 159 h or *h*
155 <Left> or *<Left>* 160 <Left> or *<Left>*
156 CTRL-H or *CTRL-H* *<BS>* 161 CTRL-H or *CTRL-H* *<BS>*
157 <BS> [count] characters to the left. |exclusive| motion. 162 <BS> [count] characters to the left. |exclusive| motion.
158 Note: If you prefer <BS> to delete a character, use 163 Note: If you prefer <BS> to delete a character, use
232 instead of going to the end of the line. 237 instead of going to the end of the line.
233 {not in Vi} 238 {not in Vi}
234 239
235 *bar* 240 *bar*
236 | To screen column [count] in the current line. 241 | To screen column [count] in the current line.
237 |exclusive| motion. 242 |exclusive| motion. Ceci n'est pas une pipe.
238 243
239 *f* 244 *f*
240 f{char} To [count]'th occurrence of {char} to the right. The 245 f{char} To [count]'th occurrence of {char} to the right. The
241 cursor is placed on {char} |inclusive|. 246 cursor is placed on {char} |inclusive|.
242 {char} can be entered as a digraph |digraph-arg|. 247 {char} can be entered as a digraph |digraph-arg|.
268 273
269 *,* 274 *,*
270 , Repeat latest f, t, F or T in opposite direction 275 , Repeat latest f, t, F or T in opposite direction
271 [count] times. 276 [count] times.
272 277
273 These commands move the cursor to the specified column in the current line.
274 They stop at the first column and at the end of the line, except "$", which
275 may move to one of the next lines. See 'whichwrap' option to make some of the
276 commands move across line boundaries.
277
278 ============================================================================== 278 ==============================================================================
279 3. Up-down motions *up-down-motions* 279 3. Up-down motions *up-down-motions*
280 280
281 k or *k* 281 k or *k*
282 <Up> or *<Up>* *CTRL-P* 282 <Up> or *<Up>* *CTRL-P*
313 313
314 *G* 314 *G*
315 G Goto line [count], default last line, on the first 315 G Goto line [count], default last line, on the first
316 non-blank character |linewise|. If 'startofline' not 316 non-blank character |linewise|. If 'startofline' not
317 set, keep the same column. 317 set, keep the same column.
318 G is a one of |jump-motions|.
318 319
319 *<C-End>* 320 *<C-End>*
320 <C-End> Goto line [count], default last line, on the last 321 <C-End> Goto line [count], default last line, on the last
321 character |inclusive|. {not in Vi} 322 character |inclusive|. {not in Vi}
322 323
323 <C-Home> or *gg* *<C-Home>* 324 <C-Home> or *gg* *<C-Home>*
324 gg Goto line [count], default first line, on the first 325 gg Goto line [count], default first line, on the first
325 non-blank character |linewise|. If 'startofline' not 326 non-blank character |linewise|. If 'startofline' not
326 set, keep the same column. 327 set, keep the same column.
327 328
328 :[range] Set the cursor on the specified line number. If 329 :[range] Set the cursor on the last line number in [range].
329 there are several numbers, the last one is used. 330 [range] can also be just one line number, e.g., ":1"
330 331 or ":'m".
332 In contrast with |G| this command does not modify the
333 |jumplist|.
331 *N%* 334 *N%*
332 {count}% Go to {count} percentage in the file, on the first 335 {count}% Go to {count} percentage in the file, on the first
333 non-blank in the line |linewise|. To compute the new 336 non-blank in the line |linewise|. To compute the new
334 line number this formula is used: 337 line number this formula is used:
335 ({count} * number-of-lines + 99) / 100 338 ({count} * number-of-lines + 99) / 100
635 is used to skip escaped quotes. 638 is used to skip escaped quotes.
636 Only works within one line. 639 Only works within one line.
637 When the cursor starts on a quote, Vim will figure out 640 When the cursor starts on a quote, Vim will figure out
638 which quote pairs form a string by searching from the 641 which quote pairs form a string by searching from the
639 start of the line. 642 start of the line.
640 Any trailing or leading white space is included. 643 Any trailing white space is included, unless there is
644 none, then leading white space is included.
641 When used in Visual mode it is made characterwise. 645 When used in Visual mode it is made characterwise.
642 Repeating this object in Visual mode another string is 646 Repeating this object in Visual mode another string is
643 included. A count is currently not used. 647 included. A count is currently not used.
644 648
645 i" *v_iquote* *iquote* 649 i" *v_iquote* *iquote*
1004 unless the line containing that position was changed or deleted. 1008 unless the line containing that position was changed or deleted.
1005 1009
1006 *CTRL-O* 1010 *CTRL-O*
1007 CTRL-O Go to [count] Older cursor position in jump list 1011 CTRL-O Go to [count] Older cursor position in jump list
1008 (not a motion command). {not in Vi} 1012 (not a motion command). {not in Vi}
1009 {not available without the +jumplist feature} 1013 {not available without the |+jumplist| feature}
1010 1014
1011 <Tab> or *CTRL-I* *<Tab>* 1015 <Tab> or *CTRL-I* *<Tab>*
1012 CTRL-I Go to [count] newer cursor position in jump list 1016 CTRL-I Go to [count] newer cursor position in jump list
1013 (not a motion command). 1017 (not a motion command).
1014 In a |quickfix-window| it takes you to the position of 1018 In a |quickfix-window| it takes you to the position of
1015 the error under the cursor. 1019 the error under the cursor.
1016 {not in Vi} 1020 {not in Vi}
1017 {not available without the +jumplist feature} 1021 {not available without the |+jumplist| feature}
1018 1022
1019 *:ju* *:jumps* 1023 *:ju* *:jumps*
1020 :ju[mps] Print the jump list (not a motion command). {not in 1024 :ju[mps] Print the jump list (not a motion command). {not in
1021 Vi} {not available without the +jumplist feature} 1025 Vi} {not available without the |+jumplist| feature}
1022 1026
1023 *jumplist* 1027 *jumplist*
1024 Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you 1028 Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you
1025 can go to cursor positions before older jumps, and back again. Thus you can 1029 can go to cursor positions before older jumps, and back again. Thus you can
1026 move up and down the list. There is a separate jump list for each window. 1030 move up and down the list. There is a separate jump list for each window.
1027 The maximum number of entries is fixed at 100. 1031 The maximum number of entries is fixed at 100.
1028 {not available without the +jumplist feature} 1032 {not available without the |+jumplist| feature}
1029 1033
1030 For example, after three jump commands you have this jump list: 1034 For example, after three jump commands you have this jump list:
1031 1035
1032 jump line col file/line ~ 1036 jump line col file/line ~
1033 3 1 0 some text ~ 1037 3 1 0 some text ~
1100 If [count] is larger than the number of older change 1104 If [count] is larger than the number of older change
1101 positions go to the oldest change. 1105 positions go to the oldest change.
1102 If there is no older change an error message is given. 1106 If there is no older change an error message is given.
1103 (not a motion command) 1107 (not a motion command)
1104 {not in Vi} 1108 {not in Vi}
1105 {not available without the +jumplist feature} 1109 {not available without the |+jumplist| feature}
1106 1110
1107 *g,* *E663* 1111 *g,* *E663*
1108 g, Go to [count] newer cursor position in change list. 1112 g, Go to [count] newer cursor position in change list.
1109 Just like |g;| but in the opposite direction. 1113 Just like |g;| but in the opposite direction.
1110 (not a motion command) 1114 (not a motion command)
1111 {not in Vi} 1115 {not in Vi}
1112 {not available without the +jumplist feature} 1116 {not available without the |+jumplist| feature}
1113 1117
1114 When using a count you jump as far back or forward as possible. Thus you can 1118 When using a count you jump as far back or forward as possible. Thus you can
1115 use "999g;" to go to the first change for which the position is still 1119 use "999g;" to go to the first change for which the position is still
1116 remembered. The number of entries in the change list is fixed and is the same 1120 remembered. The number of entries in the change list is fixed and is the same
1117 as for the |jumplist|. 1121 as for the |jumplist|.