comparison runtime/doc/map.txt @ 1236:2fdf3369a76d

updated for version 7.1
author vimboss
date Sat, 12 May 2007 13:12:19 +0000
parents 4e90dc161511
children b9740fb41986
comparison
equal deleted inserted replaced
1235:d24983341b50 1236:2fdf3369a76d
1 *map.txt* For Vim version 7.1b. Last change: 2007 May 07 1 *map.txt* For Vim version 7.1. Last change: 2007 May 11
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
807 characters are not keyword characters. 807 characters are not keyword characters.
808 808
809 Examples: "#i", "..f", "$/7" 809 Examples: "#i", "..f", "$/7"
810 810
811 non-id The "non-id" type ends in a non-keyword character, the other 811 non-id The "non-id" type ends in a non-keyword character, the other
812 characters may be of any type, excluding space and Tab. {this type 812 characters may be of any type, excluding space and tab. {this type
813 is not supported by Vi} 813 is not supported by Vi}
814 814
815 Examples: "def#", "4/7$" 815 Examples: "def#", "4/7$"
816 816
817 Examples of strings that cannot be abbreviations: "a.b", "#def", "a b", "_$r" 817 Examples of strings that cannot be abbreviations: "a.b", "#def", "a b", "_$r"
832 an additional rule: 832 an additional rule:
833 833
834 full-id In front of the match is a non-keyword character, or this is where 834 full-id In front of the match is a non-keyword character, or this is where
835 the line or insertion starts. Exception: When the abbreviation is 835 the line or insertion starts. Exception: When the abbreviation is
836 only one character, it is not recognized if there is a non-keyword 836 only one character, it is not recognized if there is a non-keyword
837 character in front of it, other than a space or a <Tab>. 837 character in front of it, other than a space or a tab.
838 838
839 end-id In front of the match is a keyword character, or a space or a <Tab>, 839 end-id In front of the match is a keyword character, or a space or a tab,
840 or this is where the line or insertion starts. 840 or this is where the line or insertion starts.
841 841
842 non-id In front of the match is a space, <Tab> or the start of the line or 842 non-id In front of the match is a space, tab or the start of the line or
843 the insertion. 843 the insertion.
844 844
845 Examples: ({CURSOR} is where you type a non-keyword character) > 845 Examples: ({CURSOR} is where you type a non-keyword character) >
846 :ab foo four old otters 846 :ab foo four old otters
847 < " foo{CURSOR}" is expanded to " four old otters" 847 < " foo{CURSOR}" is expanded to " four old otters"
1152 -nargs=1 Exactly one argument is required 1152 -nargs=1 Exactly one argument is required
1153 -nargs=* Any number of arguments are allowed (0, 1, or many) 1153 -nargs=* Any number of arguments are allowed (0, 1, or many)
1154 -nargs=? 0 or 1 arguments are allowed 1154 -nargs=? 0 or 1 arguments are allowed
1155 -nargs=+ Arguments must be supplied, but any number are allowed 1155 -nargs=+ Arguments must be supplied, but any number are allowed
1156 1156
1157 Arguments are considered to be separated by (unescaped) spaces or Tabs in this 1157 Arguments are considered to be separated by (unescaped) spaces or tabs in this
1158 context. 1158 context.
1159 1159
1160 Note that arguments are used as text, not as expressions. Specifically, 1160 Note that arguments are used as text, not as expressions. Specifically,
1161 "s:var" will use the script-local variable in the script where the command was 1161 "s:var" will use the script-local variable in the script where the command was
1162 defined, not where it is invoked! Example: 1162 defined, not where it is invoked! Example:
1322 for use in an expression. This uses the argument as one single value. 1322 for use in an expression. This uses the argument as one single value.
1323 When there is no argument <q-args> is an empty string. 1323 When there is no argument <q-args> is an empty string.
1324 *<f-args>* 1324 *<f-args>*
1325 To allow commands to pass their arguments on to a user-defined function, there 1325 To allow commands to pass their arguments on to a user-defined function, there
1326 is a special form <f-args> ("function args"). This splits the command 1326 is a special form <f-args> ("function args"). This splits the command
1327 arguments at spaces and Tabs, quotes each argument individually, and the 1327 arguments at spaces and tabs, quotes each argument individually, and the
1328 <f-args> sequence is replaced by the comma-separated list of quoted arguments. 1328 <f-args> sequence is replaced by the comma-separated list of quoted arguments.
1329 See the Mycmd example below. If no arguments are given <f-args> is removed. 1329 See the Mycmd example below. If no arguments are given <f-args> is removed.
1330 To embed whitespace into an argument of <f-args>, prepend a backslash. 1330 To embed whitespace into an argument of <f-args>, prepend a backslash.
1331 <f-args> replaces every pair of backslashes (\\) with one backslash. A 1331 <f-args> replaces every pair of backslashes (\\) with one backslash. A
1332 backslash followed by a character other than white space or a backslash 1332 backslash followed by a character other than white space or a backslash