Mercurial > vim
comparison runtime/doc/motion.txt @ 16553:0e473e9e70c2 v8.1.1280
patch 8.1.1280: remarks about functionality not in Vi clutters the help
commit https://github.com/vim/vim/commit/25c9c680ec4dfbb51f4ef21c3460a48d3c67ffc8
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 5 18:13:34 2019 +0200
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Problem: Remarks about functionality not in Vi clutters the help.
Solution: Move all info about what is new in Vim or already existed in Vi to
vi_diff.txt. Remove {not in Vi} remarks. (closes #4268) Add
"noet" to the help files modeline. Also include many other help
file improvements.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 May 2019 18:15:06 +0200 |
parents | dc766e1b0c95 |
children | 1eaf34420bb3 |
comparison
equal
deleted
inserted
replaced
16552:deb3d4f5be8b | 16553:0e473e9e70c2 |
---|---|
1 *motion.txt* For Vim version 8.1. Last change: 2019 Mar 02 | 1 *motion.txt* For Vim version 8.1. Last change: 2019 May 05 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
183 <Home> To the first character of the line. |exclusive| | 183 <Home> To the first character of the line. |exclusive| |
184 motion. When moving up or down next, stay in same | 184 motion. When moving up or down next, stay in same |
185 TEXT column (if possible). Most other commands stay | 185 TEXT column (if possible). Most other commands stay |
186 in the same SCREEN column. <Home> works like "1|", | 186 in the same SCREEN column. <Home> works like "1|", |
187 which differs from "0" when the line starts with a | 187 which differs from "0" when the line starts with a |
188 <Tab>. {not in Vi} | 188 <Tab>. |
189 | 189 |
190 *^* | 190 *^* |
191 ^ To the first non-blank character of the line. | 191 ^ To the first non-blank character of the line. |
192 |exclusive| motion. | 192 |exclusive| motion. |
193 | 193 |
200 back from past the end of the line to the last | 200 back from past the end of the line to the last |
201 character in the line. | 201 character in the line. |
202 | 202 |
203 *g_* | 203 *g_* |
204 g_ To the last non-blank character of the line and | 204 g_ To the last non-blank character of the line and |
205 [count - 1] lines downward |inclusive|. {not in Vi} | 205 [count - 1] lines downward |inclusive|. |
206 | 206 |
207 *g0* *g<Home>* | 207 *g0* *g<Home>* |
208 g0 or g<Home> When lines wrap ('wrap' on): To the first character of | 208 g0 or g<Home> When lines wrap ('wrap' on): To the first character of |
209 the screen line. |exclusive| motion. Differs from | 209 the screen line. |exclusive| motion. Differs from |
210 "0" when a line is wider than the screen. | 210 "0" when a line is wider than the screen. |
211 When lines don't wrap ('wrap' off): To the leftmost | 211 When lines don't wrap ('wrap' off): To the leftmost |
212 character of the current line that is on the screen. | 212 character of the current line that is on the screen. |
213 Differs from "0" when the first character of the line | 213 Differs from "0" when the first character of the line |
214 is not on the screen. {not in Vi} | 214 is not on the screen. |
215 | 215 |
216 *g^* | 216 *g^* |
217 g^ When lines wrap ('wrap' on): To the first non-blank | 217 g^ When lines wrap ('wrap' on): To the first non-blank |
218 character of the screen line. |exclusive| motion. | 218 character of the screen line. |exclusive| motion. |
219 Differs from "^" when a line is wider than the screen. | 219 Differs from "^" when a line is wider than the screen. |
220 When lines don't wrap ('wrap' off): To the leftmost | 220 When lines don't wrap ('wrap' off): To the leftmost |
221 non-blank character of the current line that is on the | 221 non-blank character of the current line that is on the |
222 screen. Differs from "^" when the first non-blank | 222 screen. Differs from "^" when the first non-blank |
223 character of the line is not on the screen. {not in | 223 character of the line is not on the screen. |
224 Vi} | |
225 | 224 |
226 *gm* | 225 *gm* |
227 gm Like "g0", but half a screenwidth to the right (or as | 226 gm Like "g0", but half a screenwidth to the right (or as |
228 much as possible). {not in Vi} | 227 much as possible). |
229 | 228 |
230 *g$* *g<End>* | 229 *g$* *g<End>* |
231 g$ or g<End> When lines wrap ('wrap' on): To the last character of | 230 g$ or g<End> When lines wrap ('wrap' on): To the last character of |
232 the screen line and [count - 1] screen lines downward | 231 the screen line and [count - 1] screen lines downward |
233 |inclusive|. Differs from "$" when a line is wider | 232 |inclusive|. Differs from "$" when a line is wider |
238 the line is not on the screen or when a count is used. | 237 the line is not on the screen or when a count is used. |
239 Additionally, vertical movements keep the column, | 238 Additionally, vertical movements keep the column, |
240 instead of going to the end of the line. | 239 instead of going to the end of the line. |
241 When 'virtualedit' is enabled moves to the end of the | 240 When 'virtualedit' is enabled moves to the end of the |
242 screen line. | 241 screen line. |
243 {not in Vi} | |
244 | 242 |
245 *bar* | 243 *bar* |
246 | To screen column [count] in the current line. | 244 | To screen column [count] in the current line. |
247 |exclusive| motion. Ceci n'est pas une pipe. | 245 |exclusive| motion. Ceci n'est pas une pipe. |
248 | 246 |
294 CTRL-N [count] lines downward |linewise|. | 292 CTRL-N [count] lines downward |linewise|. |
295 | 293 |
296 gk or *gk* *g<Up>* | 294 gk or *gk* *g<Up>* |
297 g<Up> [count] display lines upward. |exclusive| motion. | 295 g<Up> [count] display lines upward. |exclusive| motion. |
298 Differs from 'k' when lines wrap, and when used with | 296 Differs from 'k' when lines wrap, and when used with |
299 an operator, because it's not linewise. {not in Vi} | 297 an operator, because it's not linewise. |
300 | 298 |
301 gj or *gj* *g<Down>* | 299 gj or *gj* *g<Down>* |
302 g<Down> [count] display lines downward. |exclusive| motion. | 300 g<Down> [count] display lines downward. |exclusive| motion. |
303 Differs from 'j' when lines wrap, and when used with | 301 Differs from 'j' when lines wrap, and when used with |
304 an operator, because it's not linewise. {not in Vi} | 302 an operator, because it's not linewise. |
305 | 303 |
306 *-* | 304 *-* |
307 - <minus> [count] lines upward, on the first non-blank | 305 - <minus> [count] lines upward, on the first non-blank |
308 character |linewise|. | 306 character |linewise|. |
309 | 307 |
322 set, keep the same column. | 320 set, keep the same column. |
323 G is one of the |jump-motions|. | 321 G is one of the |jump-motions|. |
324 | 322 |
325 *<C-End>* | 323 *<C-End>* |
326 <C-End> Goto line [count], default last line, on the last | 324 <C-End> Goto line [count], default last line, on the last |
327 character |inclusive|. {not in Vi} | 325 character |inclusive|. |
328 | 326 |
329 <C-Home> or *gg* *<C-Home>* | 327 <C-Home> or *gg* *<C-Home>* |
330 gg Goto line [count], default first line, on the first | 328 gg Goto line [count], default first line, on the first |
331 non-blank character |linewise|. If 'startofline' not | 329 non-blank character |linewise|. If 'startofline' not |
332 set, keep the same column. | 330 set, keep the same column. |
340 *N%* | 338 *N%* |
341 {count}% Go to {count} percentage in the file, on the first | 339 {count}% Go to {count} percentage in the file, on the first |
342 non-blank in the line |linewise|. To compute the new | 340 non-blank in the line |linewise|. To compute the new |
343 line number this formula is used: | 341 line number this formula is used: |
344 ({count} * number-of-lines + 99) / 100 | 342 ({count} * number-of-lines + 99) / 100 |
345 See also 'startofline' option. {not in Vi} | 343 See also 'startofline' option. |
346 | 344 |
347 :[range]go[to] [count] *:go* *:goto* *go* | 345 :[range]go[to] [count] *:go* *:goto* *go* |
348 [count]go Go to [count] byte in the buffer. Default [count] is | 346 [count]go Go to [count] byte in the buffer. Default [count] is |
349 one, start of the file. When giving [range], the | 347 one, start of the file. When giving [range], the |
350 last number in it used as the byte count. End-of-line | 348 last number in it used as the byte count. End-of-line |
351 characters are counted depending on the current | 349 characters are counted depending on the current |
352 'fileformat' setting. | 350 'fileformat' setting. |
353 Also see the |line2byte()| function, and the 'o' | 351 Also see the |line2byte()| function, and the 'o' |
354 option in 'statusline'. | 352 option in 'statusline'. |
355 {not in Vi} | |
356 {not available when compiled without the | 353 {not available when compiled without the |
357 |+byte_offset| feature} | 354 |+byte_offset| feature} |
358 | 355 |
359 These commands move to the specified line. They stop when reaching the first | 356 These commands move to the specified line. They stop when reaching the first |
360 or the last line. The first two commands put the cursor in the same column | 357 or the last line. The first two commands put the cursor in the same column |
514 after an operator. The commands that start with "a" select "a"n object | 511 after an operator. The commands that start with "a" select "a"n object |
515 including white space, the commands starting with "i" select an "inner" object | 512 including white space, the commands starting with "i" select an "inner" object |
516 without white space, or just the white space. Thus the "inner" commands | 513 without white space, or just the white space. Thus the "inner" commands |
517 always select less text than the "a" commands. | 514 always select less text than the "a" commands. |
518 | 515 |
519 These commands are {not in Vi}. | |
520 These commands are not available when the |+textobjects| feature has been | 516 These commands are not available when the |+textobjects| feature has been |
521 disabled at compile time. | 517 disabled at compile time. |
522 Also see `gn` and `gN`, operating on the last search pattern. | 518 Also see `gn` and `gN`, operating on the last search pattern. |
523 | 519 |
524 *v_aw* *aw* | 520 *v_aw* *aw* |
778 *'* *'a* *`* *`a* | 774 *'* *'a* *`* *`a* |
779 '{a-z} `{a-z} Jump to the mark {a-z} in the current buffer. | 775 '{a-z} `{a-z} Jump to the mark {a-z} in the current buffer. |
780 | 776 |
781 *'A* *'0* *`A* *`0* | 777 *'A* *'0* *`A* *`0* |
782 '{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not | 778 '{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not |
783 a motion command when in another file). {not in Vi} | 779 a motion command when in another file). |
784 | 780 |
785 *g'* *g'a* *g`* *g`a* | 781 *g'* *g'a* *g`* *g`a* |
786 g'{mark} g`{mark} | 782 g'{mark} g`{mark} |
787 Jump to the {mark}, but don't change the jumplist when | 783 Jump to the {mark}, but don't change the jumplist when |
788 jumping within the current buffer. Example: > | 784 jumping within the current buffer. Example: > |
789 g`" | 785 g`" |
790 < jumps to the last known position in a file. See | 786 < jumps to the last known position in a file. See |
791 $VIMRUNTIME/vimrc_example.vim. | 787 $VIMRUNTIME/vimrc_example.vim. |
792 Also see |:keepjumps|. | 788 Also see |:keepjumps|. |
793 {not in Vi} | |
794 | 789 |
795 *:marks* | 790 *:marks* |
796 :marks List all the current marks (not a motion command). | 791 :marks List all the current marks (not a motion command). |
797 The |'(|, |')|, |'{| and |'}| marks are not listed. | 792 The |'(|, |')|, |'{| and |'}| marks are not listed. |
798 The first column has number zero. | 793 The first column has number zero. |
799 {not in Vi} | 794 |
800 *E283* | 795 *E283* |
801 :marks {arg} List the marks that are mentioned in {arg} (not a | 796 :marks {arg} List the marks that are mentioned in {arg} (not a |
802 motion command). For example: > | 797 motion command). For example: > |
803 :marks aB | 798 :marks aB |
804 < to list marks 'a' and 'B'. {not in Vi} | 799 < to list marks 'a' and 'B'. |
805 | 800 |
806 *:delm* *:delmarks* | 801 *:delm* *:delmarks* |
807 :delm[arks] {marks} Delete the specified marks. Marks that can be deleted | 802 :delm[arks] {marks} Delete the specified marks. Marks that can be deleted |
808 include A-Z and 0-9. You cannot delete the ' mark. | 803 include A-Z and 0-9. You cannot delete the ' mark. |
809 They can be specified by giving the list of mark | 804 They can be specified by giving the list of mark |
813 :delmarks a b 1 deletes marks a, b and 1 | 808 :delmarks a b 1 deletes marks a, b and 1 |
814 :delmarks Aa deletes marks A and a | 809 :delmarks Aa deletes marks A and a |
815 :delmarks p-z deletes marks in the range p to z | 810 :delmarks p-z deletes marks in the range p to z |
816 :delmarks ^.[] deletes marks ^ . [ ] | 811 :delmarks ^.[] deletes marks ^ . [ ] |
817 :delmarks \" deletes mark " | 812 :delmarks \" deletes mark " |
818 < {not in Vi} | |
819 | 813 |
820 :delm[arks]! Delete all marks for the current buffer, but not marks | 814 :delm[arks]! Delete all marks for the current buffer, but not marks |
821 A-Z or 0-9. | 815 A-Z or 0-9. |
822 {not in Vi} | |
823 | 816 |
824 A mark is not visible in any way. It is just a position in the file that is | 817 A mark is not visible in any way. It is just a position in the file that is |
825 remembered. Do not confuse marks with named registers, they are totally | 818 remembered. Do not confuse marks with named registers, they are totally |
826 unrelated. | 819 unrelated. |
827 | 820 |
852 Numbered mark should be stored. See |viminfo-file-marks|. | 845 Numbered mark should be stored. See |viminfo-file-marks|. |
853 | 846 |
854 | 847 |
855 *'[* *`[* | 848 *'[* *`[* |
856 '[ `[ To the first character of the previously changed | 849 '[ `[ To the first character of the previously changed |
857 or yanked text. {not in Vi} | 850 or yanked text. |
858 | 851 |
859 *']* *`]* | 852 *']* *`]* |
860 '] `] To the last character of the previously changed or | 853 '] `] To the last character of the previously changed or |
861 yanked text. {not in Vi} | 854 yanked text. |
862 | 855 |
863 After executing an operator the Cursor is put at the beginning of the text | 856 After executing an operator the Cursor is put at the beginning of the text |
864 that was operated upon. After a put command ("p" or "P") the cursor is | 857 that was operated upon. After a put command ("p" or "P") the cursor is |
865 sometimes placed at the first inserted line and sometimes on the last inserted | 858 sometimes placed at the first inserted line and sometimes on the last inserted |
866 character. The four commands above put the cursor at either end. Example: | 859 character. The four commands above put the cursor at either end. Example: |
874 | 867 |
875 *'<* *`<* | 868 *'<* *`<* |
876 '< `< To the first line or character of the last selected | 869 '< `< To the first line or character of the last selected |
877 Visual area in the current buffer. For block mode it | 870 Visual area in the current buffer. For block mode it |
878 may also be the last character in the first line (to | 871 may also be the last character in the first line (to |
879 be able to define the block). {not in Vi}. | 872 be able to define the block). |
880 | 873 |
881 *'>* *`>* | 874 *'>* *`>* |
882 '> `> To the last line or character of the last selected | 875 '> `> To the last line or character of the last selected |
883 Visual area in the current buffer. For block mode it | 876 Visual area in the current buffer. For block mode it |
884 may also be the first character of the last line (to | 877 may also be the first character of the last line (to |
885 be able to define the block). Note that 'selection' | 878 be able to define the block). Note that 'selection' |
886 applies, the position may be just after the Visual | 879 applies, the position may be just after the Visual |
887 area. {not in Vi}. | 880 area. |
888 | 881 |
889 *''* *``* | 882 *''* *``* |
890 '' `` To the position before the latest jump, or where the | 883 '' `` To the position before the latest jump, or where the |
891 last "m'" or "m`" command was given. Not set when the | 884 last "m'" or "m`" command was given. Not set when the |
892 |:keepjumps| command modifier was used. | 885 |:keepjumps| command modifier was used. |
898 line. See |last-position-jump| for how to use this | 891 line. See |last-position-jump| for how to use this |
899 for each opened file. | 892 for each opened file. |
900 Only one position is remembered per buffer, not one | 893 Only one position is remembered per buffer, not one |
901 for each window. As long as the buffer is visible in | 894 for each window. As long as the buffer is visible in |
902 a window the position won't be changed. | 895 a window the position won't be changed. |
903 {not in Vi}. | |
904 | 896 |
905 *'^* *`^* | 897 *'^* *`^* |
906 '^ `^ To the position where the cursor was the last time | 898 '^ `^ To the position where the cursor was the last time |
907 when Insert mode was stopped. This is used by the | 899 when Insert mode was stopped. This is used by the |
908 |gi| command. Not set when the |:keepjumps| command | 900 |gi| command. Not set when the |:keepjumps| command |
909 modifier was used. {not in Vi} | 901 modifier was used. |
910 | 902 |
911 *'.* *`.* | 903 *'.* *`.* |
912 '. `. To the position where the last change was made. The | 904 '. `. To the position where the last change was made. The |
913 position is at or near where the change started. | 905 position is at or near where the change started. |
914 Sometimes a command is executed as several changes, | 906 Sometimes a command is executed as several changes, |
915 then the position can be near the end of what the | 907 then the position can be near the end of what the |
916 command changed. For example when inserting a word, | 908 command changed. For example when inserting a word, |
917 the position will be on the last character. | 909 the position will be on the last character. |
918 To jump to older changes use |g;|. | 910 To jump to older changes use |g;|. |
919 {not in Vi} | |
920 | 911 |
921 *'(* *`(* | 912 *'(* *`(* |
922 '( `( To the start of the current sentence, like the |(| | 913 '( `( To the start of the current sentence, like the |(| |
923 command. {not in Vi} | 914 command. |
924 | 915 |
925 *')* *`)* | 916 *')* *`)* |
926 ') `) To the end of the current sentence, like the |)| | 917 ') `) To the end of the current sentence, like the |)| |
927 command. {not in Vi} | 918 command. |
928 | 919 |
929 *'{* *`{* | 920 *'{* *`{* |
930 '{ `{ To the start of the current paragraph, like the |{| | 921 '{ `{ To the start of the current paragraph, like the |{| |
931 command. {not in Vi} | 922 command. |
932 | 923 |
933 *'}* *`}* | 924 *'}* *`}* |
934 '} `} To the end of the current paragraph, like the |}| | 925 '} `} To the end of the current paragraph, like the |}| |
935 command. {not in Vi} | 926 command. |
936 | 927 |
937 These commands are not marks themselves, but jump to a mark: | 928 These commands are not marks themselves, but jump to a mark: |
938 | 929 |
939 *]'* | 930 *]'* |
940 ]' [count] times to next line with a lowercase mark below | 931 ]' [count] times to next line with a lowercase mark below |
941 the cursor, on the first non-blank character in the | 932 the cursor, on the first non-blank character in the |
942 line. {not in Vi} | 933 line. |
943 | 934 |
944 *]`* | 935 *]`* |
945 ]` [count] times to lowercase mark after the cursor. {not | 936 ]` [count] times to lowercase mark after the cursor. {not |
946 in Vi} | 937 in Vi} |
947 | 938 |
948 *['* | 939 *['* |
949 [' [count] times to previous line with a lowercase mark | 940 [' [count] times to previous line with a lowercase mark |
950 before the cursor, on the first non-blank character in | 941 before the cursor, on the first non-blank character in |
951 the line. {not in Vi} | 942 the line. |
952 | 943 |
953 *[`* | 944 *[`* |
954 [` [count] times to lowercase mark before the cursor. | 945 [` [count] times to lowercase mark before the cursor. |
955 {not in Vi} | |
956 | 946 |
957 | 947 |
958 :loc[kmarks] {command} *:loc* *:lockmarks* | 948 :loc[kmarks] {command} *:loc* *:lockmarks* |
959 Execute {command} without adjusting marks. This is | 949 Execute {command} without adjusting marks. This is |
960 useful when changing text in a way that the line count | 950 useful when changing text in a way that the line count |
1028 commands that start editing a new file. | 1018 commands that start editing a new file. |
1029 | 1019 |
1030 *CTRL-O* | 1020 *CTRL-O* |
1031 CTRL-O Go to [count] Older cursor position in jump list | 1021 CTRL-O Go to [count] Older cursor position in jump list |
1032 (not a motion command). | 1022 (not a motion command). |
1033 {not in Vi} | |
1034 {not available without the |+jumplist| feature} | 1023 {not available without the |+jumplist| feature} |
1035 | 1024 |
1036 <Tab> or *CTRL-I* *<Tab>* | 1025 <Tab> or *CTRL-I* *<Tab>* |
1037 CTRL-I Go to [count] newer cursor position in jump list | 1026 CTRL-I Go to [count] newer cursor position in jump list |
1038 (not a motion command). | 1027 (not a motion command). |
1039 {not in Vi} | |
1040 {not available without the |+jumplist| feature} | 1028 {not available without the |+jumplist| feature} |
1041 | 1029 |
1042 *:ju* *:jumps* | 1030 *:ju* *:jumps* |
1043 :ju[mps] Print the jump list (not a motion command). | 1031 :ju[mps] Print the jump list (not a motion command). |
1044 {not in Vi} | |
1045 {not available without the |+jumplist| feature} | 1032 {not available without the |+jumplist| feature} |
1046 | 1033 |
1047 *:cle* *:clearjumps* | 1034 *:cle* *:clearjumps* |
1048 :cle[arjumps] Clear the jump list of the current window. | 1035 :cle[arjumps] Clear the jump list of the current window. |
1049 {not in Vi} | |
1050 {not available without the |+jumplist| feature} | 1036 {not available without the |+jumplist| feature} |
1051 | 1037 |
1052 *jumplist* | 1038 *jumplist* |
1053 Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you | 1039 Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you |
1054 can go to cursor positions before older jumps, and back again. Thus you can | 1040 can go to cursor positions before older jumps, and back again. Thus you can |
1129 g; Go to [count] older position in change list. | 1115 g; Go to [count] older position in change list. |
1130 If [count] is larger than the number of older change | 1116 If [count] is larger than the number of older change |
1131 positions go to the oldest change. | 1117 positions go to the oldest change. |
1132 If there is no older change an error message is given. | 1118 If there is no older change an error message is given. |
1133 (not a motion command) | 1119 (not a motion command) |
1134 {not in Vi} | |
1135 {not available without the |+jumplist| feature} | 1120 {not available without the |+jumplist| feature} |
1136 | 1121 |
1137 *g,* *E663* | 1122 *g,* *E663* |
1138 g, Go to [count] newer cursor position in change list. | 1123 g, Go to [count] newer cursor position in change list. |
1139 Just like |g;| but in the opposite direction. | 1124 Just like |g;| but in the opposite direction. |
1140 (not a motion command) | 1125 (not a motion command) |
1141 {not in Vi} | |
1142 {not available without the |+jumplist| feature} | 1126 {not available without the |+jumplist| feature} |
1143 | 1127 |
1144 When using a count you jump as far back or forward as possible. Thus you can | 1128 When using a count you jump as far back or forward as possible. Thus you can |
1145 use "999g;" to go to the first change for which the position is still | 1129 use "999g;" to go to the first change for which the position is still |
1146 remembered. The number of entries in the change list is fixed and is the same | 1130 remembered. The number of entries in the change list is fixed and is the same |
1227 percentage down the file |N%|. Using '%' on | 1211 percentage down the file |N%|. Using '%' on |
1228 #if/#else/#endif makes the movement linewise. | 1212 #if/#else/#endif makes the movement linewise. |
1229 | 1213 |
1230 *[(* | 1214 *[(* |
1231 [( go to [count] previous unmatched '('. | 1215 [( go to [count] previous unmatched '('. |
1232 |exclusive| motion. {not in Vi} | 1216 |exclusive| motion. |
1233 | 1217 |
1234 *[{* | 1218 *[{* |
1235 [{ go to [count] previous unmatched '{'. | 1219 [{ go to [count] previous unmatched '{'. |
1236 |exclusive| motion. {not in Vi} | 1220 |exclusive| motion. |
1237 | 1221 |
1238 *])* | 1222 *])* |
1239 ]) go to [count] next unmatched ')'. | 1223 ]) go to [count] next unmatched ')'. |
1240 |exclusive| motion. {not in Vi} | 1224 |exclusive| motion. |
1241 | 1225 |
1242 *]}* | 1226 *]}* |
1243 ]} go to [count] next unmatched '}'. | 1227 ]} go to [count] next unmatched '}'. |
1244 |exclusive| motion. {not in Vi} | 1228 |exclusive| motion. |
1245 | 1229 |
1246 The above four commands can be used to go to the start or end of the current | 1230 The above four commands can be used to go to the start or end of the current |
1247 code block. It is like doing "%" on the '(', ')', '{' or '}' at the other | 1231 code block. It is like doing "%" on the '(', ')', '{' or '}' at the other |
1248 end of the code block, but you can do this from anywhere in the code block. | 1232 end of the code block, but you can do this from anywhere in the code block. |
1249 Very useful for C programs. Example: When standing on "case x:", "[{" will | 1233 Very useful for C programs. Example: When standing on "case x:", "[{" will |
1252 *]m* | 1236 *]m* |
1253 ]m Go to [count] next start of a method (for Java or | 1237 ]m Go to [count] next start of a method (for Java or |
1254 similar structured language). When not before the | 1238 similar structured language). When not before the |
1255 start of a method, jump to the start or end of the | 1239 start of a method, jump to the start or end of the |
1256 class. When no '{' is found after the cursor, this is | 1240 class. When no '{' is found after the cursor, this is |
1257 an error. |exclusive| motion. {not in Vi} | 1241 an error. |exclusive| motion. |
1258 *]M* | 1242 *]M* |
1259 ]M Go to [count] next end of a method (for Java or | 1243 ]M Go to [count] next end of a method (for Java or |
1260 similar structured language). When not before the end | 1244 similar structured language). When not before the end |
1261 of a method, jump to the start or end of the class. | 1245 of a method, jump to the start or end of the class. |
1262 When no '}' is found after the cursor, this is an | 1246 When no '}' is found after the cursor, this is an |
1263 error. |exclusive| motion. {not in Vi} | 1247 error. |exclusive| motion. |
1264 *[m* | 1248 *[m* |
1265 [m Go to [count] previous start of a method (for Java or | 1249 [m Go to [count] previous start of a method (for Java or |
1266 similar structured language). When not after the | 1250 similar structured language). When not after the |
1267 start of a method, jump to the start or end of the | 1251 start of a method, jump to the start or end of the |
1268 class. When no '{' is found before the cursor this is | 1252 class. When no '{' is found before the cursor this is |
1269 an error. |exclusive| motion. {not in Vi} | 1253 an error. |exclusive| motion. |
1270 *[M* | 1254 *[M* |
1271 [M Go to [count] previous end of a method (for Java or | 1255 [M Go to [count] previous end of a method (for Java or |
1272 similar structured language). When not after the | 1256 similar structured language). When not after the |
1273 end of a method, jump to the start or end of the | 1257 end of a method, jump to the start or end of the |
1274 class. When no '}' is found before the cursor this is | 1258 class. When no '}' is found before the cursor this is |
1275 an error. |exclusive| motion. {not in Vi} | 1259 an error. |exclusive| motion. |
1276 | 1260 |
1277 The above two commands assume that the file contains a class with methods. | 1261 The above two commands assume that the file contains a class with methods. |
1278 The class definition is surrounded in '{' and '}'. Each method in the class | 1262 The class definition is surrounded in '{' and '}'. Each method in the class |
1279 is also surrounded with '{' and '}'. This applies to the Java language. The | 1263 is also surrounded with '{' and '}'. This applies to the Java language. The |
1280 file looks like this: > | 1264 file looks like this: > |
1293 method is long!). Using "2[m" will jump to the start of "method_one()". | 1277 method is long!). Using "2[m" will jump to the start of "method_one()". |
1294 Using "3[m" will jump to the start of the class. | 1278 Using "3[m" will jump to the start of the class. |
1295 | 1279 |
1296 *[#* | 1280 *[#* |
1297 [# go to [count] previous unmatched "#if" or "#else". | 1281 [# go to [count] previous unmatched "#if" or "#else". |
1298 |exclusive| motion. {not in Vi} | 1282 |exclusive| motion. |
1299 | 1283 |
1300 *]#* | 1284 *]#* |
1301 ]# go to [count] next unmatched "#else" or "#endif". | 1285 ]# go to [count] next unmatched "#else" or "#endif". |
1302 |exclusive| motion. {not in Vi} | 1286 |exclusive| motion. |
1303 | 1287 |
1304 These two commands work in C programs that contain #if/#else/#endif | 1288 These two commands work in C programs that contain #if/#else/#endif |
1305 constructs. It brings you to the start or end of the #if/#else/#endif where | 1289 constructs. It brings you to the start or end of the #if/#else/#endif where |
1306 the current line is included. You can then use "%" to go to the matching line. | 1290 the current line is included. You can then use "%" to go to the matching line. |
1307 | 1291 |
1308 *[star* *[/* | 1292 *[star* *[/* |
1309 [* or [/ go to [count] previous start of a C comment "/*". | 1293 [* or [/ go to [count] previous start of a C comment "/*". |
1310 |exclusive| motion. {not in Vi} | 1294 |exclusive| motion. |
1311 | 1295 |
1312 *]star* *]/* | 1296 *]star* *]/* |
1313 ]* or ]/ go to [count] next end of a C comment "*/". | 1297 ]* or ]/ go to [count] next end of a C comment "*/". |
1314 |exclusive| motion. {not in Vi} | 1298 |exclusive| motion. |
1315 | 1299 |
1316 | 1300 |
1317 *H* | 1301 *H* |
1318 H To line [count] from top (Home) of window (default: | 1302 H To line [count] from top (Home) of window (default: |
1319 first line on the window) on the first non-blank | 1303 first line on the window) on the first non-blank |
1337 visible line. | 1321 visible line. |
1338 | 1322 |
1339 <LeftMouse> Moves to the position on the screen where the mouse | 1323 <LeftMouse> Moves to the position on the screen where the mouse |
1340 click is |exclusive|. See also |<LeftMouse>|. If the | 1324 click is |exclusive|. See also |<LeftMouse>|. If the |
1341 position is in a status line, that window is made the | 1325 position is in a status line, that window is made the |
1342 active window and the cursor is not moved. {not in Vi} | 1326 active window and the cursor is not moved. |
1343 | 1327 |
1344 vim:tw=78:ts=8:noet:ft=help:norl: | 1328 vim:tw=78:ts=8:noet:ft=help:norl: |