comparison runtime/doc/motion.txt @ 34:e170173ecb68 current-release

before ack base protocol.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 26 Nov 2008 15:02:10 +0900
parents 76efa0be13f1
children c16898406ff2
comparison
equal deleted inserted replaced
33:7d0d8b831f5a 34:e170173ecb68
1 *motion.txt* For Vim version 7.1. Last change: 2006 Dec 07 1 *motion.txt* For Vim version 7.2. Last change: 2008 Aug 03
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
364 <C-Right> or *<C-Right>* *W* 364 <C-Right> or *<C-Right>* *W*
365 W [count] WORDS forward. |exclusive| motion. 365 W [count] WORDS forward. |exclusive| motion.
366 366
367 *e* 367 *e*
368 e Forward to the end of word [count] |inclusive|. 368 e Forward to the end of word [count] |inclusive|.
369 Does not stop in an empty line.
369 370
370 *E* 371 *E*
371 E Forward to the end of WORD [count] |inclusive|. 372 E Forward to the end of WORD [count] |inclusive|.
373 Does not stop in an empty line.
372 374
373 <S-Left> or *<S-Left>* *b* 375 <S-Left> or *<S-Left>* *b*
374 b [count] words backward. |exclusive| motion. 376 b [count] words backward. |exclusive| motion.
375 377
376 <C-Left> or *<C-Left>* *B* 378 <C-Left> or *<C-Left>* *B*
463 The definition of a sentence cannot be changed. 465 The definition of a sentence cannot be changed.
464 466
465 *paragraph* 467 *paragraph*
466 A paragraph begins after each empty line, and also at each of a set of 468 A paragraph begins after each empty line, and also at each of a set of
467 paragraph macros, specified by the pairs of characters in the 'paragraphs' 469 paragraph macros, specified by the pairs of characters in the 'paragraphs'
468 option. The default is "IPLPPPQPP LIpplpipbp", which corresponds to the 470 option. The default is "IPLPPPQPP TPHPLIPpLpItpplpipbp", which corresponds to
469 macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in the 471 the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in
470 first column). A section boundary is also a paragraph boundary. 472 the first column). A section boundary is also a paragraph boundary.
471 Note that a blank line (only containing white space) is NOT a paragraph 473 Note that a blank line (only containing white space) is NOT a paragraph
472 boundary. 474 boundary.
473 Also note that this does not include a '{' or '}' in the first column. When 475 Also note that this does not include a '{' or '}' in the first column. When
474 the '{' flag is in 'cpoptions' then '{' in the first column is used as a 476 the '{' flag is in 'cpoptions' then '{' in the first column is used as a
475 paragraph boundary |posix|. 477 paragraph boundary |posix|.
807 809
808 Lowercase marks 'a to 'z are remembered as long as the file remains in the 810 Lowercase marks 'a to 'z are remembered as long as the file remains in the
809 buffer list. If you remove the file from the buffer list, all its marks are 811 buffer list. If you remove the file from the buffer list, all its marks are
810 lost. If you delete a line that contains a mark, that mark is erased. 812 lost. If you delete a line that contains a mark, that mark is erased.
811 813
812 To delete a mark: Create a new line, position the mark there, delete the line.
813 E.g.: "o<Esc>mxdd". This does change the file though. Using "u" won't work,
814 it also restores marks.
815
816 Lowercase marks can be used in combination with operators. For example: "d't" 814 Lowercase marks can be used in combination with operators. For example: "d't"
817 deletes the lines from the cursor position to mark 't'. Hint: Use mark 't' for 815 deletes the lines from the cursor position to mark 't'. Hint: Use mark 't' for
818 Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo and 816 Top, 'b' for Bottom, etc.. Lowercase marks are restored when using undo and
819 redo. 817 redo.
820 818
851 Note: After deleting text, the start and end positions are the same, except 849 Note: After deleting text, the start and end positions are the same, except
852 when using blockwise Visual mode. These commands do not work when no change 850 when using blockwise Visual mode. These commands do not work when no change
853 was made yet in the current file. 851 was made yet in the current file.
854 852
855 *'<* *`<* 853 *'<* *`<*
856 '< `< To the first character of the last selected Visual 854 '< `< To the first line or character of the last selected
857 area in the current buffer. For block mode it may 855 Visual area in the current buffer. For block mode it
858 also be the last character in the first line (to be 856 may also be the last character in the first line (to
859 able to define the block). {not in Vi}. 857 be able to define the block). {not in Vi}.
860 858
861 *'>* *`>* 859 *'>* *`>*
862 '> `> To the last character of the last selected Visual 860 '> `> To the last line or character of the last selected
863 area in the current buffer. For block mode it may 861 Visual area in the current buffer. For block mode it
864 also be the first character of the last line (to be 862 may also be the first character of the last line (to
865 able to define the block). Note that 'selection' 863 be able to define the block). Note that 'selection'
866 applies, the position may be just after the Visual 864 applies, the position may be just after the Visual
867 area. {not in Vi}. 865 area. {not in Vi}.
868 866
869 *''* *``* 867 *''* *``*
870 '' `` To the position before the latest jump, or where the 868 '' `` To the position before the latest jump, or where the
1171 #if, #ifdef, #else, #elif, #endif 1169 #if, #ifdef, #else, #elif, #endif
1172 C preprocessor conditionals (when the 1170 C preprocessor conditionals (when the
1173 cursor is on the # or no ([{ 1171 cursor is on the # or no ([{
1174 following) 1172 following)
1175 For other items the matchit plugin can be used, see 1173 For other items the matchit plugin can be used, see
1176 |matchit-install|. 1174 |matchit-install|. This plugin also helps to skip
1175 matches in comments.
1177 1176
1178 When 'cpoptions' contains "M" |cpo-M| backslashes 1177 When 'cpoptions' contains "M" |cpo-M| backslashes
1179 before parens and braces are ignored. Without "M" the 1178 before parens and braces are ignored. Without "M" the
1180 number of backslashes matters: an even number doesn't 1179 number of backslashes matters: an even number doesn't
1181 match with an odd number. Thus in "( \) )" and "\( ( 1180 match with an odd number. Thus in "( \) )" and "\( (
1182 \)" the first and last parenthesis match. 1181 \)" the first and last parenthesis match.
1182
1183 When the '%' character is not present in 'cpoptions' 1183 When the '%' character is not present in 'cpoptions'
1184 |cpo-%|, parens and braces inside double quotes are 1184 |cpo-%|, parens and braces inside double quotes are
1185 ignored, unless the number of parens/braces in a line 1185 ignored, unless the number of parens/braces in a line
1186 is uneven and this line and the previous one does not 1186 is uneven and this line and the previous one does not
1187 end in a backslash. '(', '{', '[', ']', '}' and ')' 1187 end in a backslash. '(', '{', '[', ']', '}' and ')'
1188 are also ignored (parens and braces inside single 1188 are also ignored (parens and braces inside single
1189 quotes). Note that this works fine for C, but not for 1189 quotes). Note that this works fine for C, but not for
1190 Perl, where single quotes are used for strings. 1190 Perl, where single quotes are used for strings.
1191 No count is allowed ({count}% jumps to a line {count} 1191
1192 percentage down the file |N%|). Using '%' on 1192 Nothing special is done for matches in comments. You
1193 can either use the matchit plugin |matchit-install| or
1194 put quotes around matches.
1195
1196 No count is allowed, {count}% jumps to a line {count}
1197 percentage down the file |N%|. Using '%' on
1193 #if/#else/#endif makes the movement linewise. 1198 #if/#else/#endif makes the movement linewise.
1194 1199
1195 *[(* 1200 *[(*
1196 [( go to [count] previous unmatched '('. 1201 [( go to [count] previous unmatched '('.
1197 |exclusive| motion. {not in Vi} 1202 |exclusive| motion. {not in Vi}