Mercurial > vim
comparison runtime/doc/motion.txt @ 9:4102fb4ea781 v7.0002
updated for version 7.0002
author | vimboss |
---|---|
date | Sun, 20 Jun 2004 12:51:53 +0000 |
parents | 3fc0f57ecb91 |
children | bdeee1504ac1 |
comparison
equal
deleted
inserted
replaced
8:7edf9b6e4c36 | 9:4102fb4ea781 |
---|---|
1 *motion.txt* For Vim version 7.0aa. Last change: 2004 May 13 | 1 *motion.txt* For Vim version 7.0aa. Last change: 2004 Jun 17 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
670 m[ or m] Set the |'[| or |']| mark. Useful when an operator is | 670 m[ or m] Set the |'[| or |']| mark. Useful when an operator is |
671 to be simulated by multiple commands. (does not move | 671 to be simulated by multiple commands. (does not move |
672 the cursor, this is not a motion command). | 672 the cursor, this is not a motion command). |
673 | 673 |
674 *:ma* *:mark* *E191* | 674 *:ma* *:mark* *E191* |
675 :[range]ma[rk] {a-zA-Z} Set mark {a-zA-Z} at last line number in [range], | 675 :[range]ma[rk] {a-zA-Z'} |
676 Set mark {a-zA-Z'} at last line number in [range], | |
676 column 0. Default is cursor line. | 677 column 0. Default is cursor line. |
677 | 678 |
678 *:k* | 679 *:k* |
679 :[range]k{a-zA-Z} Same as :mark, but the space before the mark name can | 680 :[range]k{a-zA-Z'} Same as :mark, but the space before the mark name can |
680 be omitted. | 681 be omitted. |
681 | 682 |
682 *'* *'a* *`* *`a* | 683 *'* *'a* *`* *`a* |
683 '{a-z} `{a-z} Jump to the mark {a-z}. | 684 '{a-z} `{a-z} Jump to the mark {a-z}. |
684 | 685 |
690 g'{mark} g`{mark} | 691 g'{mark} g`{mark} |
691 Jump to the {mark}, but don't change the jumplist when | 692 Jump to the {mark}, but don't change the jumplist when |
692 jumping within the current buffer. Example: > | 693 jumping within the current buffer. Example: > |
693 g`" | 694 g`" |
694 < jumps to the last known position in a file. See | 695 < jumps to the last known position in a file. See |
695 $VIMRUNTIME/vimrc_example.vim. {not in Vi} | 696 $VIMRUNTIME/vimrc_example.vim. |
697 Also see |:keepjumps|. | |
698 {not in Vi} | |
696 | 699 |
697 *:marks* | 700 *:marks* |
698 :marks List all the current marks (not a motion command). | 701 :marks List all the current marks (not a motion command). |
699 The |'(|, |')|, |'{| and |'}| marks are not listed. | 702 The |'(|, |')|, |'{| and |'}| marks are not listed. |
700 {not in Vi} | 703 {not in Vi} |
866 |:range!|: | 869 |:range!|: |
867 - When the number of lines after filtering is equal to | 870 - When the number of lines after filtering is equal to |
868 or larger than before, all marks are kept at the | 871 or larger than before, all marks are kept at the |
869 same line number. | 872 same line number. |
870 - When the number of lines decreases, the marks in the | 873 - When the number of lines decreases, the marks in the |
871 ilnes that disappeared are deleted. | 874 lines that disappeared are deleted. |
872 In any case the marks below the filtered text have | 875 In any case the marks below the filtered text have |
873 their line numbers adjusted, thus stick to the text, | 876 their line numbers adjusted, thus stick to the text, |
874 as usual. | 877 as usual. |
875 When the 'R' flag is missing from 'cpoptions' this has | 878 When the 'R' flag is missing from 'cpoptions' this has |
876 the same effect as using ":keepmarks". | 879 the same effect as using ":keepmarks". |
877 | 880 |
878 *:keepj* *:keepjumps* | 881 *:keepj* *:keepjumps* |
879 :keepj[umps] {command} | 882 :keepj[umps] {command} |
880 Do not change the |''|, |'.| and |'^| marks, the | 883 Moving around in {command} does not change the |''|, |
881 |jumplist| or the |changelist|. Useful when making a | 884 |'.| and |'^| marks, the |jumplist| or the |
882 change or inserting text automatically and the user | 885 |changelist|. |
883 doesn't want to go to this position. E.g., when | 886 Useful when making a change or inserting text |
884 updating a "Last change" timestamp: > | 887 automatically and the user doesn't want to go to this |
885 autocmd BufWritePre,FileWritePre *.abc keepjumps call SetLastChange() | 888 position. E.g., when updating a "Last change" |
889 timestamp in the first line: > | |
890 | |
891 :let lnum = getline(".") | |
892 :keepjumps normal gg | |
893 :call SetLastChange() | |
894 :keepjumps exe "normal " . lnum . "G" | |
895 < | |
896 Note that ":keepjumps" must be used for every command. | |
897 When invoking a function the commands in that function | |
898 can still change the jumplist. | |
886 | 899 |
887 ============================================================================== | 900 ============================================================================== |
888 8. Jumps *jump-motions* | 901 8. Jumps *jump-motions* |
889 | 902 |
890 A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n", | 903 A "jump" is one of the following commands: "'", "`", "G", "/", "?", "n", |