comparison runtime/doc/motion.txt @ 48:67300faee616 v7-3-618

v7-3-618
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 01 Aug 2012 18:08:28 +0900
parents c16898406ff2
children
comparison
equal deleted inserted replaced
47:6c0584ec21b1 48:67300faee616
1 *motion.txt* For Vim version 7.3. Last change: 2010 May 14 1 *motion.txt* For Vim version 7.3. Last change: 2012 Jul 25
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
55 |gq| gq text formatting 55 |gq| gq text formatting
56 |g?| g? ROT13 encoding 56 |g?| g? ROT13 encoding
57 |>| > shift right 57 |>| > shift right
58 |<| < shift left 58 |<| < shift left
59 |zf| zf define a fold 59 |zf| zf define a fold
60 |g@| g@ call function set with the 'operatorfunc' option 60 |g@| g@ call function set with the 'operatorfunc' option
61 61
62 If the motion includes a count and the operator also had a count before it, 62 If the motion includes a count and the operator also had a count before it,
63 the two counts are multiplied. For example: "2d3w" deletes six words. 63 the two counts are multiplied. For example: "2d3w" deletes six words.
64 64
65 After applying the operator the cursor is mostly left at the start of the text 65 After applying the operator the cursor is mostly left at the start of the text
267 left. The cursor is placed on the character right of 267 left. The cursor is placed on the character right of
268 {char} |exclusive|. 268 {char} |exclusive|.
269 {char} can be entered like with the |f| command. 269 {char} can be entered like with the |f| command.
270 270
271 *;* 271 *;*
272 ; Repeat latest f, t, F or T [count] times. 272 ; Repeat latest f, t, F or T [count] times. See |cpo-;|
273 273
274 *,* 274 *,*
275 , Repeat latest f, t, F or T in opposite direction 275 , Repeat latest f, t, F or T in opposite direction
276 [count] times. 276 [count] times. See also |cpo-;|
277 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*
342 [count]go Go to {count} byte in the buffer. Default [count] is 342 [count]go Go to {count} byte in the buffer. Default [count] is
343 one, start of the file. When giving [range], the 343 one, start of the file. When giving [range], the
344 last number in it used as the byte count. End-of-line 344 last number in it used as the byte count. End-of-line
345 characters are counted depending on the current 345 characters are counted depending on the current
346 'fileformat' setting. 346 'fileformat' setting.
347 Also see the |line2byte()| function, and the 'o'
348 option in 'statusline'.
347 {not in Vi} 349 {not in Vi}
348 {not available when compiled without the 350 {not available when compiled without the
349 |+byte_offset| feature} 351 |+byte_offset| feature}
350 352
351 These commands move to the specified line. They stop when reaching the first 353 These commands move to the specified line. They stop when reaching the first
509 always select less text than the "a" commands. 511 always select less text than the "a" commands.
510 512
511 These commands are {not in Vi}. 513 These commands are {not in Vi}.
512 These commands are not available when the |+textobjects| feature has been 514 These commands are not available when the |+textobjects| feature has been
513 disabled at compile time. 515 disabled at compile time.
516 Also see `gn` and `gN`, operating on the last search pattern.
517
514 *v_aw* *aw* 518 *v_aw* *aw*
515 aw "a word", select [count] words (see |word|). 519 aw "a word", select [count] words (see |word|).
516 Leading or trailing white space is included, but not 520 Leading or trailing white space is included, but not
517 counted. 521 counted.
518 When used in Visual linewise mode "aw" switches to 522 When used in Visual linewise mode "aw" switches to
685 "dl" delete character (alias: "x") |dl| 689 "dl" delete character (alias: "x") |dl|
686 "diw" delete inner word *diw* 690 "diw" delete inner word *diw*
687 "daw" delete a word *daw* 691 "daw" delete a word *daw*
688 "diW" delete inner WORD (see |WORD|) *diW* 692 "diW" delete inner WORD (see |WORD|) *diW*
689 "daW" delete a WORD (see |WORD|) *daW* 693 "daW" delete a WORD (see |WORD|) *daW*
694 "dgn" delete the next search pattern match *dgn*
690 "dd" delete one line |dd| 695 "dd" delete one line |dd|
691 "dis" delete inner sentence *dis* 696 "dis" delete inner sentence *dis*
692 "das" delete a sentence *das* 697 "das" delete a sentence *das*
693 "dib" delete inner '(' ')' block *dib* 698 "dib" delete inner '(' ')' block *dib*
694 "dab" delete a '(' ')' block *dab* 699 "dab" delete a '(' ')' block *dab*
745 750
746 *m[* *m]* 751 *m[* *m]*
747 m[ or m] Set the |'[| or |']| mark. Useful when an operator is 752 m[ or m] Set the |'[| or |']| mark. Useful when an operator is
748 to be simulated by multiple commands. (does not move 753 to be simulated by multiple commands. (does not move
749 the cursor, this is not a motion command). 754 the cursor, this is not a motion command).
755
756 *m<* *m>*
757 m< or m> Set the |'<| or |'>| mark. Useful to change what the
758 `gv` command selects. (does not move the cursor, this
759 is not a motion command).
760 Note that the Visual mode cannot be set, only the
761 start and end position.
750 762
751 *:ma* *:mark* *E191* 763 *:ma* *:mark* *E191*
752 :[range]ma[rk] {a-zA-Z'} 764 :[range]ma[rk] {a-zA-Z'}
753 Set mark {a-zA-Z'} at last line number in [range], 765 Set mark {a-zA-Z'} at last line number in [range],
754 column 0. Default is cursor line. 766 column 0. Default is cursor line.
1013 {not available without the |+jumplist| feature} 1025 {not available without the |+jumplist| feature}
1014 1026
1015 <Tab> or *CTRL-I* *<Tab>* 1027 <Tab> or *CTRL-I* *<Tab>*
1016 CTRL-I Go to [count] newer cursor position in jump list 1028 CTRL-I Go to [count] newer cursor position in jump list
1017 (not a motion command). 1029 (not a motion command).
1018 In a |quickfix-window| it takes you to the position of
1019 the error under the cursor.
1020 {not in Vi} 1030 {not in Vi}
1021 {not available without the |+jumplist| feature} 1031 {not available without the |+jumplist| feature}
1022 1032
1023 *:ju* *:jumps* 1033 *:ju* *:jumps*
1024 :ju[mps] Print the jump list (not a motion command). {not in 1034 :ju[mps] Print the jump list (not a motion command). {not in
1031 The maximum number of entries is fixed at 100. 1041 The maximum number of entries is fixed at 100.
1032 {not available without the |+jumplist| feature} 1042 {not available without the |+jumplist| feature}
1033 1043
1034 For example, after three jump commands you have this jump list: 1044 For example, after three jump commands you have this jump list:
1035 1045
1036 jump line col file/line ~ 1046 jump line col file/text ~
1037 3 1 0 some text ~ 1047 3 1 0 some text ~
1038 2 70 0 another line ~ 1048 2 70 0 another line ~
1039 1 1154 23 end. ~ 1049 1 1154 23 end. ~
1040 > ~ 1050 > ~
1041 1051
1042 The "file/line" column shows the file name, or the text at the jump if it is 1052 The "file/text" column shows the file name, or the text at the jump if it is
1043 in the current file (an indent is removed and a long line is truncated to fit 1053 in the current file (an indent is removed and a long line is truncated to fit
1044 in the window). 1054 in the window).
1045 1055
1046 You are currently in line 1167. If you then use the CTRL-O command, the 1056 You are currently in line 1167. If you then use the CTRL-O command, the
1047 cursor is put in line 1154. This results in: 1057 cursor is put in line 1154. This results in:
1048 1058
1049 jump line col file/line ~ 1059 jump line col file/text ~
1050 2 1 0 some text ~ 1060 2 1 0 some text ~
1051 1 70 0 another line ~ 1061 1 70 0 another line ~
1052 > 0 1154 23 end. ~ 1062 > 0 1154 23 end. ~
1053 1 1167 0 foo bar ~ 1063 1 1167 0 foo bar ~
1054 1064
1074 command. You can explicitly add a jump by setting the ' mark. 1084 command. You can explicitly add a jump by setting the ' mark.
1075 1085
1076 After the CTRL-O command that got you into line 1154 you could give another 1086 After the CTRL-O command that got you into line 1154 you could give another
1077 jump command (e.g., "G"). The jump list would then become: 1087 jump command (e.g., "G"). The jump list would then become:
1078 1088
1079 jump line col file/line ~ 1089 jump line col file/text ~
1080 4 1 0 some text ~ 1090 4 1 0 some text ~
1081 3 70 0 another line ~ 1091 3 70 0 another line ~
1082 2 1167 0 foo bar ~ 1092 2 1167 0 foo bar ~
1083 1 1154 23 end. ~ 1093 1 1154 23 end. ~
1084 > ~ 1094 > ~