Lines Matching refs:with
55 {only when compiled with the |+float| feature}
100 NOTE: when using |scriptversion-4| octal with a leading "0" is not recognized.
102 If the String doesn't start with digits, the result is zero.
130 "foo" is converted to 0, which means FALSE. If the string starts with a
183 A Funcref variable is obtained with the |function()| function, the |funcref()|
184 function or created with the lambda expression |expr-lambda|. It can be used
191 A Funcref variable must start with a capital, "s:", "w:", "t:" or "b:". You
192 can use "g:" but the following name must still start with a capital. You
193 cannot have both a Funcref variable and a function with the same name.
201 The key of the Dictionary can start with a lower case letter. The actual
204 A Funcref can also be used with the |:call| command: >
208 The name of the referenced function can be obtained with |string()|. >
262 A List is created with a comma separated list of items in square brackets.
296 Two lists can be concatenated with the "+" operator: >
313 :let shortlist = mylist[2:2] " List with one item: [3]
344 Making a copy of a list is done with the |copy()| function. Using [:] also
370 same length and all items compare equal, as with using "==". There is one
371 exception: When comparing a number with a string they are considered
372 different. There is no automatic type conversion, as with using "==" on
420 Adding and removing items from a list is done with functions. Here are a few
426 :call extend(list, [1, 2]) " extend the list with two more items
431 :call filter(list, 'v:val !~ "x"') " remove items with an 'x'
442 A variable is set to each item in sequence. Example with a List: >
486 Functions that are useful with a List: >
487 :let r = call(funcname, list) " call a function with an argument list
509 entry can be located with the key. The entries are stored without a specific
515 A Dictionary is created with a comma separated list of entries in curly
531 Note that 333 here is the string "333". Empty keys are not possible with #{}.
577 a List in which each item is a List with two items, the key and the value: >
605 Removing an entry from a Dictionary is done with |remove()| or |:unlet|.
606 Three ways to remove the entry with key "aaa" from dict: >
611 Merging a Dictionary with another is done with |extend()|: >
613 This extends adict with all entries from bdict. Duplicate keys cause entries
619 Weeding out entries from a Dictionary can be done with |filter()|: >
621 This removes all entries from "dict" with a value not matching 'x'.
628 When a function is defined with the "dict" attribute it can be used in a
629 special way with a dictionary. Example: >
659 If you get an error for a numbered function, you can find out what it is with
666 Functions that can be used with a Dictionary: >
667 :if has_key(dict, 'foo') " TRUE if dict has entry with key "foo"
688 A Blob can be created with a |blob-literal|: >
694 A blob can be read from a file with |readfile()| passing the {type} argument
698 A blob can be read from a channel with the |ch_readblob()| function.
726 This calls Doit() with 0x11, 0x22 and 0x33.
731 Two blobs can be concatenated with the "+" operator: >
749 :let shortblob = myblob[2:2] " Blob with one byte: 0z22
805 Making a copy of a Blob is done with the |copy()| function. Using [:] also
815 start with an uppercase letter, and don't contain a lowercase letter, are
819 start with an uppercase letter and contain at least one lowercase letter are
828 It's possible to form a variable name with curly braces, see
884 expr8(expr1, ...) function call with |Funcref| variable
896 va{ria}ble internal variable with curly braces
900 func{ti}on(expr1, ...) function call with curly braces
1031 A |List| can only be compared with a |List| and only "equal", "not equal",
1036 A |Dictionary| can only be compared with a |Dictionary| and only "equal", "not
1042 A |Funcref| can only be compared with a |Funcref| and only "equal", "not
1044 arguments or a Dictionary are bound (with a partial) matters. The
1053 Using "is" or "isnot" with a |List|, |Dictionary| or |Blob| checks whether
1067 When comparing a String with a Number, the String is converted to a Number,
1076 When comparing two Strings, this is done with strcmp() or stricmp(). This
1080 When using the operators with a trailing '#', or the short version and
1081 'ignorecase' is off, the comparing is done with strcmp(): case matters.
1083 When using the operators with a trailing '?', or the short version and
1084 'ignorecase' is set, the comparing is done with stricmp(): case is ignored.
1088 The "=~" and "!~" operators match the lefthand argument with the righthand
1109 result is a new list with the two lists Concatenated.
1201 start with one!
1206 In Vim9 script a negative index is used like with a list: count from the end.
1220 If expr8 is a String this results in the substring with the bytes or
1252 If expr8 is a |List| this results in a new |List| with the items indicated by
1253 the indexes expr1a and expr1b. This works like with a String, as explained
1256 :let l = mylist[4:4] " List with one item
1259 If expr8 is a |Blob| this results in a new |Blob| with the bytes in the
1281 but it may start with a number. Curly braces cannot be used.
1340 Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B)
1341 and Octal (starting with 0, 0o or 0O).
1356 {only when compiled with the |+float| feature}
1390 means in the library Vim was compiled with. There is no way to change this at
1411 \x.. byte specified with two hex numbers (e.g., "\x1f")
1412 \x. byte specified with one hex number (must be followed by non-hex char)
1415 \u.... character specified with up to 4 hex numbers, stored according to the
1445 Hexadecimal starting with 0z or 0Z, with an arbitrary number of bytes.
1506 environment variables with non-alphanumeric names.
1507 The function `environ()` can be used to get a Dict with all environment
1574 Lambda and closure support can be checked with: >
1577 Examples for using a lambda expression with |sort()|, |map()| and |filter()|: >
1605 for a lambda expression, you can find what it is with the following command: >
1613 cannot start with a digit. It's also possible to use curly braces, see
1616 An internal variable is created with the ":let" command |:let|.
1617 An internal variable is explicitly destroyed with the ":unlet" command
1645 A variable name that is preceded with "b:" is local to the current buffer.
1647 This kind of variable is deleted when the buffer is wiped out or deleted with
1665 A variable name that is preceded with "w:" is local to the current window. It
1669 A variable name that is preceded with "t:" is local to the current tab page,
1674 Inside functions global variables are accessed with "g:". Omitting this will
1682 refers to "v:count". Using "l:count" you can have a local variable with the
1686 In a Vim script variables starting with "s:" can be used. They cannot be
1702 Script variables can be used to avoid conflicts with global variable names.
1766 v:argv The command line arguments Vim was invoked with. This is a
1825 2. When printing a PostScript file with ":hardcopy" this is
1845 color names can be used with the |highlight-guifg|,
1868 Using |extend()| with the 'keep' option updates each color only
1978 v:false A Number with value zero. Used to put "false" in JSON. See
2000 do with the affected buffer:
2080 evaluating the expression used with |map()| and |filter()|.
2109 v:mouse_win Window number for a mouse click obtained with |getchar()|.
2110 First window has number 1, like with |winnr()|. The value is
2114 v:mouse_winid Window ID for a mouse click obtained with |getchar()|.
2118 v:mouse_lnum Line number for a mouse click obtained with |getchar()|.
2123 v:mouse_col Column number for a mouse click obtained with |getchar()|.
2124 This is the screen column number, like with |virtcol()|. The
2169 {only when compiled with the |+viminfo| feature}
2201 character except for commands starting with <g> or <z>,
2225 v:progname Contains the name (with path removed) with which Vim was
2231 v:progpath Contains the command with which Vim was invoked, in a form
2361 that starts with ESC [ or CSI, then '>' or '?' and ends in a
2362 'c', with only digits and ';' in between.
2371 {only when compiled with |+termresponse| feature}
2396 does with ambiguous width characters, see 'ambiwidth'.
2423 v:true A Number with value one. Used to put "true" in JSON. See
2432 valid while evaluating the expression used with |map()| and
2448 four digits. Version 8.1 with patch 123 has value 8010123.
2541 any call {func} with arguments {arglist}
2611 escape({string}, {chars}) String escape {chars} in {string} with '\'
2622 expandcmd({expr}) String expand {expr} like with `:edit`
2774 libcall({lib}, {func}, {arg}) String call {func} in library {lib} with {arg}
2801 Number highlight {pattern} with {group}
2803 Number highlight positions with {group}
2826 nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr}
3025 strftime({format} [, {time}]) String format time with a specified format
3043 String all {pat} in {expr} replaced with {sub}
3072 term_getjob({buf}) Job get the job associated with a terminal
3113 test_override({expr}, {val}) none test with Vim internal overrides
3150 win_gotoid({expr}) Number go to window with ID {expr}
3189 < {only available when compiled with the |+float| feature}
3206 < {only available when compiled with the |+float| feature}
3239 {lnum} is used like with |getline()|.
3258 {lnum} is used like with |append()|. Note that using |line()|
3310 < Without the {nr} argument, or when {nr} is -1, a |List| with
3330 {only available when compiled with the |+float| feature}
3350 {only available when compiled with the |+float| feature}
3366 {only available when compiled with the |+float| feature}
3376 split with |balloon_split()|.
3400 {only available when compiled with the |+balloon_eval| or
3407 Returns a |List| with the split lines.
3411 < {only available when compiled with the |+balloon_eval_term|
3451 Add a buffer to the buffer list with String {name}.
3474 - The name of a buffer with 'buftype' set to "nofile".
3481 with a |:buffer| command you may need to use |expand()|. Esp
3494 The {buf} argument is used like with |bufexists()|.
3506 The {buf} argument is used like with |bufexists()|.
3514 The {buf} argument is used like with |bufexists()|.
3527 with the buffer names. This is always done like 'magic' is
3537 with a listed buffer, that one is returned. Next unlisted
3565 buffer with an empty name use |bufadd()|.
3570 of existing buffers. Note that not all buffers with a smaller
3583 window associated with buffer {buf}. For the use of {buf},
3589 Only deals with the current tab page.
3602 < The number can be used with |CTRL-W_w| and ":wincmd w"
3664 Call function {func} with the items in |List| {arglist} as
3669 {dict} is for functions with the "dict" attribute. It will be
3690 {only available when compiled with the |+float| feature}
3698 number as what is displayed with |:undolist| and can be used
3699 with the |:undo| command.
3738 position given with {expr} instead of the byte position.
3741 With the cursor on '세' in line 5 with text "여보세요": >
3801 indenting rules, as with 'cindent'.
3814 If {win} is specified, use the window with this number or
3822 position given with {expr}. The accepted positions are:
3832 Additionally {expr} can be [lnum, col]: a |List| with the line
3864 with CTRL-R = (see |i_CTRL-R|). It does not work after CTRL-O
3865 or with an expression mapping.
3876 The match can be selected with CTRL-N and CTRL-P as usual with
3897 function specified with the 'completefunc' option.
3912 Only to be used by the function specified with the
3917 Returns a |Dictionary| with information about Insert mode
3940 "scroll" Scrolling with |i_CTRL-X_CTRL-E| or
3980 Note: confirm() is only supported when compiled with dialog
3983 {msg} is displayed in a |dialog| with {choices} as the
3989 {choices} is a String, with the individual choices separated
4057 {only available when compiled with the |+float| feature}
4073 {only available when compiled with the |+float| feature}
4077 Return the number of times an item with value {expr} appears
4080 If {start} is given then start with the item with this index.
4081 {start} can only be used with a |List|.
4139 with two, three or four item:
4150 {lnum} is used like with |getline()|.
4196 that refers back to a higher level making a deep copy with
4204 Without {flags} or with {flags} empty: Deletes the file by the
4238 {first} and {last} are used like with |getline()|. Note that
4262 {lnum} is used like with |getline()|. Thus "." is the current
4273 {lnum} is used like with |getline()|. Thus "." is the current
4277 The highlight ID can be used with |synIDattr()| to obtain
4285 Return the digraph of {chars}. This should be a string with
4307 This function works only when compiled with the |+digraphs|
4333 This function works only when compiled with the |+digraphs|
4340 with two characters. {digraph} is a string with one UTF-8
4343 useful to add digraphs start with a white space.
4357 This function works only when compiled with the |+digraphs|
4365 where each list contains two strings with {chars} and
4380 This function works only when compiled with the |+digraphs|
4392 < Use with care, you can mess up the terminal this way.
4407 length with zero.
4421 Escape the characters in {chars} that occur in {string} with a
4448 This function checks if an executable with the name {expr}
4488 The default is "silent". Note that with "silent!", unlike
4510 with "./", which may be a problem for Vim: >
4534 done by comparing with an empty
4562 1 for match with start of a command
4563 2 full match with a command
4645 {only available when compiled with the |+float| feature}
4660 not start with '%', '#' or '<', see below.
4662 When {string} starts with '%', '#' or '<', the expansion is
4663 done like for the |cmdline-special| variables with their
4695 < Note that when expanding a string that starts with '%', '#' or
4712 buffer with no name, results in the current directory, with a
4715 When {string} does not start with '%', '#' or '<', it is
4742 like with |expand()|, and environment variables, anywhere in
4757 item with index {expr3} in {expr1}. When {expr3} is zero
4833 several times without 'x' and then one time with 'x'
4834 (possibly with an empty {string}) to execute all the
4842 '!' When used with 'x' will not end Insert mode. Can be
4852 The result is a Number, which is |TRUE| when a file with the
4871 The result is a Number, which is 1 when a file with the
4897 < Removes the items with a key below 8. >
4927 unless it was defined with the "abort" flag.
4947 {only available when compiled with the |+file_in_path|
5016 {only available when compiled with the |+float| feature}
5034 {only available when compiled with the |+float| feature}
5054 {only available when compiled with |+float| feature}
5060 are escaped with a backslash.
5094 {lnum} is used like with |getline()|. Thus "." is the current
5104 {lnum} is used like with |getline()|. Thus "." is the current
5119 {lnum} is used like with |getline()|. Thus "." is the current
5138 will be filled with the fold char from the 'fillchars'
5147 {lnum} is used like with |getline()|. Thus "." is the current
5169 The string argument {name} may start with a `:` and can
5220 < Invokes the function as with: >
5229 < Invokes the function as with: >
5241 < Invokes the function as with: >
5266 < Invokes the function as with: >
5282 |Dictionary| with circular references in a script that runs
5307 Get item with key {key} from |Dictionary| {dict}. When this
5316 Get an item with from Funcref {func}. Possible values for
5321 "args" The list with arguments
5345 Each returned List item is a dictionary with the following
5354 {only with the |+viminfo| feature}
5370 Each list item is a dictionary with
5375 variables A reference to the dictionary with
5401 Return a |List| with the lines starting from {lnum} to {end}
5403 |List| with only the line {lnum} is returned.
5432 When {varname} is empty returns a |Dictionary| with all the
5434 When {varname} is equal to "&" returns a |Dictionary| with all
5436 Otherwise, when {varname} starts with "&" returns the value of
5456 The returned list contains two entries: a list with the change
5458 entry in the change list is a dictionary with the following
5482 Otherwise a String is returned with the encoded character.
5483 For a special key it's a String with a sequence of bytes
5484 starting with 0x80 (decimal: 128). This is the same value as
5519 window it should work better with a |popup-filter|.
5552 the last obtained character with getchar() or in another way.
5576 With the cursor on '세' in line 5 with text "여보세요": >
5585 with the following entries:
5732 If {winid} is invalid a list with zeroes is returned.
5750 With the cursor on '보' in line 3 with text "여보세요": >
5830 is replaced with the string "-". Examples: >
5900 The returned list contains two entries: a list with the jump
5902 Each entry in the jump location list is a dictionary with
5918 < When {lnum} is a String that doesn't start with a
5942 Returns a |List| with all the entries in the location list for
5964 Returns a |Dictionary| with default values if there is no
5974 Without the {buf} argument returns a |List| with information
5981 Each item in the returned List is a |Dict| with the following:
5983 pos a |List| with the position of the mark:
5995 Returns a |List| with all matches previously defined for the
5997 |getmatches()| is useful in combination with |setmatches()|,
6000 If {win} is specified, use the window with this number or
6019 Returns a |Dictionary| with the last known position of the
6055 The result is a |List| with four numbers:
6083 Returns a |List| with all the current quickfix errors. Each
6084 list item is a dictionary with these entries:
6102 returned. Quickfix list entries with a non-existing buffer
6103 number are returned with "bufnr" set to zero (Note: some
6108 do something with them: >
6123 id get information for the quickfix list with
6155 "items" with the list of entries.
6192 be restored with |setreg()|. For other registers the extra
6211 Dictionary with the following entries:
6224 with `dd`, this field will be "1",
6245 <CTRL-V> is one character with value 0x16.
6261 Each List item is a |Dictionary| with the following entries:
6263 variables a reference to the dictionary with
6273 Tabs are numbered starting with one.
6275 dictionary with all tab-local variables is returned.
6287 dictionary with all window-local variables is returned.
6290 Otherwise, when {varname} starts with "&" get the value of a
6293 Tabs are numbered starting with one. For the current tabpage
6327 Each item in the stack is a dictionary with the following
6357 Returns information about windows as a |List| with Dictionaries.
6359 If {winid} is given Information about the window with that ID
6360 is returned, as a |List| with one item. If the window does not
6366 Each List item is a |Dictionary| with the following entries:
6371 {only with the +quickfix feature}
6373 {only with the +quickfix feature}
6375 {only with the +terminal feature}
6378 variables a reference to the dictionary with
6397 The result is a |List| with two numbers, the result of
6424 The value can be used with `:winpos`.
6431 The value can be used with `:winpos`.
6453 with all matching files. The advantage of using a List is,
6483 pattern. The result can be used to match with a string that
6502 directory name is prepended to {expr} and expanded like with
6504 To add a comma inside a directory name escape it with a
6516 with all matching files. The advantage of using a List is, you
6522 {alllinks} is used as with |glob()|.
6565 has an entry with key {key}. FALSE otherwise. The {key}
6686 Remove all entries starting with "*" from the search history: >
6703 The result is a String, the entry with Number {index} from
6745 optional {name} is specified, then returns a List with only
6754 Each entry in the returned List is a Dictionary with the
6782 have a dictionary value with the following optional boolean
6805 with attributes.
6809 with a specified name doesn't exist, then it is created.
6847 with name {name}. When the highlight group doesn't exist,
6869 are replaced with "?".
6872 Most conversions require Vim to be compiled with the |+iconv|
6875 This can be used to display messages with special characters,
6906 If {start} is given then start looking at the item with index
6923 The highlighting set with |:echohl| is used for the prompt.
6924 The input is entered just like a command-line, with the same
6955 Example with a mapping: >
6987 The user can also select an item by clicking on it with the
7004 Restore typeahead that was saved with a previous |inputsave()|.
7018 This function acts much like the |input()| function with but
7035 If {idx} is specified insert {item} before the item with index
7044 < The last example can be done simpler with |add()|.
7073 with the name {directory} exists. If {directory} doesn't
7091 {only available when compiled with the |+float| feature}
7112 Return |TRUE| if {expr} is a float with value NaN. >
7119 {only available when compiled with the |+float| feature}
7122 Return a |List| with all the key-value pairs of {dict}. Each
7123 |List| item is a list with two items: the key of a {dict}
7145 converted into a string like with |string()|.
7152 This is similar to |json_decode()| with these differences:
7162 This is similar to |json_encode()| with these differences:
7173 than JSON, especially when using an array with optional items.
7243 Return a |List| with all the keys of {dict}. The |List| is in
7252 used, as with |strlen()|.
7266 with single argument {argument}.
7268 especially made to be used with Vim. Since only one argument
7331 position given with {expr}. The {expr} argument is a string.
7372 it is the file size plus one. {lnum} is used like with
7382 indenting rules, as with 'lisp'.
7409 < The same can be done (slowly) with: >
7429 The {callback} is invoked with five arguments:
7435 a:changes a List of items with details about the changes
7444 dictionary with these entries:
7468 col first column with a change or 1
7480 The {callback} is invoked with the text locked, see
7506 Remove a listener previously added with listener_add().
7531 {only available when compiled with the |+float| feature}
7546 {only available when compiled with the |+float| feature}
7555 with |+float| and to numbers otherwise.
7566 < {only available when compiled with the |+lua| feature}
7570 Replace each item in {expr1} with the result of evaluating
7592 If {expr2} is a |Funcref| it is called with two arguments:
7616 unless it was defined with the "abort" flag.
7652 containing all the information of the mapping with the
7661 "script" 1 if mapping was defined with <script>.
7676 The dictionary can be used to restore a mapping with
7689 Check if there is a mapping that matches with {name} in mode
7694 A match happens with a mapping that starts with {name} and
7695 with a mapping which is equal to the start of {name}.
7703 The difference with maparg() is that mapcheck() finds a
7704 mapping that matches with {name}, while maparg() only finds a
7706 When there is no mapping that starts with {name}, an empty
7708 is returned. If there are several mappings that start with
7744 e.g. with `:map!`, you need to save the mapping for all of
7817 "match"). It will be highlighted with {group}. Returns an
7827 match. A match with a high priority will have its
7828 highlighting overrule that of a match with a lower priority.
7832 hence all matches with a priority greater than zero will
7854 window with this number or window ID.
7856 The number of matches is not limited, as it is the case with
7885 - A list with one number, e.g., [23]. The whole line with this
7887 - A list with two numbers, e.g., [23, 11]. The first number is
7892 - A list with three numbers, e.g., [23, 11, 3]. As above, but
7910 Selects the {nr} match item, as set with a |:match|,
7912 Return a |List| with two elements:
7925 Deletes a match with ID {id} previously defined by |matchadd()|
7929 If {win} is specified, use the window with this number or
7942 do it with matchend(): >
7959 If {list} is a list of strings, then returns a |List| with all
8001 < results in a list of buffer information dicts with buffer
8005 < results in a list of buffer information dicts with buffer
8028 list with three empty list items is returned.
8150 with <silent> argument |:menu-silent|
8204 created with 0o755.
8269 with |remote_expr()| In most other places it always returns
8285 Hash tables are represented as Vim |Dictionary| type with keys
8287 All other types are converted to string with display function.
8300 {only available when compiled with the |+mzscheme| feature}
8308 {lnum} is used like with |getline()|.
8315 Return a string with a single character, which has the number
8321 nr2char(300) returns I with bow character
8323 Note that a NUL character in the file is specified with
8324 nr2char(10), because NULs are represented with newline
8376 < {only available when compiled with the |+perl| feature}
8396 {only available when compiled with the |+float| feature}
8404 {lnum} is used like with |getline()|.
8411 Return a String with {fmt}, where "%" items are replaced by
8428 %5d decimal number padded with spaces to 5 characters
8430 %04x hex number padded with zeros to at least 4 characters
8433 %08b binary number padded with zeros to at least 8 chars
8442 Conversion specifications start with '%' and end with the
8459 if a zero value is printed with an explicit
8469 value is padded on the left with zeros rather
8470 than blanks. If a precision is given with a
8476 The converted value is padded on the right with
8477 blanks, rather than on the left with blanks or
8490 than the field width, it will be padded with spaces on
8529 requires fewer digits, it is padded on the left with
8555 automatically converted to text with the same format
8569 or "-inf" with %f (INF or -INF with %F).
8570 "0.0 / 0.0" results in "nan" with %f (NAN with %F).
8581 decimal point, like with 'f'.
8584 g G The Float argument is converted like with 'f' if the
8618 < {only available when compiled with the |+channel| feature}
8634 The callback is invoked with one argument, which is the text
8653 < {only available when compiled with the |+channel| feature}
8667 < {only available when compiled with the |+channel| feature}
8679 < {only available when compiled with the |+channel| feature}
8686 |Dictionary| with the following keys:
8710 Dictionaries are represented as Vim |Dictionary| type with
8718 < {only available when compiled with the |+python3| feature}
8735 < {only available when compiled with the |+python| feature}
8746 < {only available when compiled with the |+python| or the
8750 Return a pseudo-random Number generated with an xoshiro128**
8766 Returns a |List| with Numbers:
8770 {max}] (increasing {expr} with {stride} each time, not
8795 Return a list with file and directory names in {directory}.
8850 Return a list of Dictionaries with file and directory
8913 files separated with CR will result in a single long line
8915 All NUL characters are replaced with a NL character.
8938 "B" a |Blob| is returned with the binary data of the file
8949 |List| or a |Blob|. {func} is called with two arguments: the
8978 list with items that depend on the system. In Vim 9 script
8996 {only available when compiled with the |+reltime| feature}
9012 < {only available when compiled with the |+reltime| feature}
9033 < {only available when compiled with the |+reltime| feature}
9040 into a String by joining the items with a line break in
9041 between (not at the end), like with join(expr, "\n").
9043 of a variable and a {serverid} for later use with
9049 {only available when compiled with the |+clientserver| feature}
9066 Move the Vim server with the name {server} to the foreground.
9087 {retvar} if specified. {retvar} must be a string with the
9093 {only available when compiled with the |+clientserver| feature}
9107 {only available when compiled with the |+clientserver| feature}
9120 and a {serverid} for later use with remote_read() is stored
9124 {only available when compiled with the |+clientserver| feature}
9148 < {only available when compiled with the |+clientserver| feature}
9154 return a |List| with these items. When {idx} points to the same
9155 item as {end} a list with one item is returned. When {end}
9171 return a |Blob| with these bytes. When {idx} points to the same
9172 byte as {end} a |Blob| with one byte is returned. When {end}
9179 Remove the entry from {dict} with key {key} and return it.
9216 To cope with link cycles, resolving of symbolic links is
9252 {only available when compiled with the |+float| feature}
9269 < {only available when compiled with the |+ruby| feature}
9317 The result is a Dict with the screen position of the text
9334 right position and use |screencol()| to get the value with
9346 Note: Same restrictions as with |screencol()|.
9351 This is like |screenchars()| but returning a String with the
9381 cursor is moved. The 's' flag cannot be combined with the 'n'
9411 {only available when compiled with the |+reltime| feature}
9413 If the {skip} expression is given it is evaluated with the
9485 this function with `recompute: 0` . This sometimes returns
9539 This can also be used to count matched texts with specified
9561 and different with |@/|.
9630 {flags} 'b', 'c', 'n', 's', 'w' and 'W' are used like with
9634 'm' Return number of matches instead of line number with
9640 {skip} expression is evaluated with the cursor positioned on
9657 The search starts exactly at the cursor. A match with
9664 < When starting at the "if 2", with the cursor on the "i", and
9672 that when the cursor is inside a match with the end it finds
9700 Same as |searchpair()|, but returns a |List| with the line and
9712 Same as |search()|, but returns a |List| with the line and
9720 < When the 'p' flag is given then there is an extra item with
9731 that sent a string can be retrieved with expand("<client>").
9732 {only available when compiled with the |+clientserver| feature}
9749 {only available when compiled with the |+clientserver| feature}
9769 {lnum} is used like with |setline()|.
9808 The {list} argument is a list of lists with each three
9815 range overlaps with another.
9816 Only characters with value 0x100 and higher can be used.
9868 |c_CTRL-\_e|, |c_CTRL-R_=| or |c_CTRL-R_CTRL-R| with '='. For
9869 |c_CTRL-\_e| and |c_CTRL-R_CTRL-R| with '=' the position is
9910 {mode} must be a string with 9 characters. It is of the form
9934 {lnum} is used like with |getline()|.
9985 If {win} is specified, use the window with this number or
9997 {list} must be a |List| with four or five numbers:
10007 since these are associated with a window, not a buffer.
10036 vertically; if you set the cursor position with this, |j| and
10094 with the items from {list}. This can also be used to
10224 Tabs are numbered starting with one.
10234 Tabs are numbered starting with one. For the current tabpage
10301 Returns a String with 64 hex characters, which is the SHA256
10307 < {only available when compiled with the |+cryptv| feature}
10319 replace all "'" with "'\''".
10327 The "!" character will be escaped (again with a |non-zero-arg|
10340 Example of use with a |:!| command: >
10343 cursor. Example of use with |system()|: >
10353 'tabstop' value. This function was introduced with patch
10400 {only available when compiled with the |+float| feature}
10416 {only available when compiled with the |+float| feature}
10451 " ö is sorted similarly to o with English locale.
10456 " ö is sorted after z with Swedish locale.
10475 is called to compare items. The function is invoked with two
10480 {dict} is for functions with the "dict" attribute. It will be
10512 {only available when compiled with the |+sound| feature}
10533 echomsg "sound " .. a:id .. " finished with " .. a:status
10545 < {only available when compiled with the |+sound| feature}
10551 with this command: >
10557 < {only available when compiled with the |+sound| feature}
10573 < {only available when compiled with the |+sound| feature}
10598 The return value is a list with two items:
10604 "caps" word should start with Capital
10617 Return a |List| with spelling suggestions to replace {word}.
10622 suggestions with a leading capital will be given. Use this
10623 after a match with 'spellcapcheck'.
10681 {only available when compiled with the |+float| feature}
10709 your autocommand, check with `state()` if the work can be
10747 12.0. You can strip out thousands separators with
10754 {only available when compiled with the |+float| feature}
10781 with the default String to Number conversion. Example: >
10861 When {string} contains characters with East Asian Width Class
10876 The language can be changed with the |:language| command.
10916 with a single character it works similar to strchr().
10924 can be parsed back with |eval()|.
10958 byte {start}, with the byte length {len}.
10992 If the {timestring} cannot be parsed with {format} zero is
11027 When used with a single character it works similar to the C
11034 The result is a String, which is {string} with all unprintable
11048 When {string} contains characters with East Asian Width Class
11065 a list of strings, similar to |getline()| with two arguments.
11086 the first match of {pat} is replaced with {sub}.
11091 But the matching with {pat} is always done like the 'magic'
11098 A "~" in {sub} is not replaced with the previous {sub}.
11100 |sub-replace-special|. For example, to replace something with
11112 When {sub} starts with "\=", the remainder is interpreted as
11117 < When {sub} is a Funcref that function is called, with one
11141 In case of failure an "error" item is added with the reason:
11163 The syntax ID can be used with |synIDattr()| and
11170 zero. {lnum} is used like with |getline()|.
11198 "bg" background color (as with "fg")
11201 "sp" special color for the GUI (as with "fg")
11228 highlight the character. Highlight links given with
11235 The result is a |List| with currently three items:
11238 region, 1 if it is. {lnum} is used like with |getline()|.
11248 with the same replacement character. For an example, if
11263 used like with |getline()|. Each item in the List is an ID
11274 < When the position specified with {lnum} and {col} is invalid
11288 in a way |writefile()| does with {binary} set to "b" (i.e.
11289 with a newline between each list item with newlines inside
11304 Note: Use |shellescape()| or |::S| with |expand()| or
11316 is filtered to replace <CR> with <NL> for Macintosh, and
11317 <CR><NL> with <NL> for DOS-like systems.
11319 characters are replaced with SOH (0x01).
11344 Same as |system()|, but returns a |List| with lines (parts of
11345 output separated by NL) with NULs transformed into NLs. Output
11346 is the same as |readfile()| will output with {binary} argument
11363 buffer associated with each window in the current tab page.
11387 The number can be used with the |:tab| command.
11393 {arg} is used like with |winnr()|:
11407 tagfiles() Returns a |List| with the file names used to search for tags
11418 Each list item is a dictionary with at least the following
11470 {only available when compiled with the |+float| feature}
11486 {only available when compiled with the |+float| feature}
11497 option is set, or when 'shellcmdflag' starts with '-' and
11505 Returns a |Dictionary| with properties of the terminal that Vim
11543 Return a list with information about timers.
11549 For each timer the information is stored in a |Dictionary| with
11552 "time" time the timer was started with
11562 < {only available when compiled with the |+timers| feature}
11580 < {only available when compiled with the |+timers| feature}
11591 function or a |Funcref|. It is called with one argument, which
11595 to avoid interfering with what the user is doing.
11619 {only available when compiled with the |+timers| feature}
11629 < {only available when compiled with the |+timers| feature}
11636 {only available when compiled with the |+timers| feature}
11639 The result is a copy of the String given, with all uppercase
11647 The result is a copy of the String given, with all lowercase
11655 The result is a copy of the {src} string with all characters
11660 This code also deals with multibyte characters properly.
11686 This function deals with multibyte characters properly.
11702 Return the largest integral value with magnitude less than or
11716 {only available when compiled with the |+float| feature}
11758 with name {name} when writing. This uses the 'undodir'
11765 Useful in combination with |:wundo| and |:rundo|.
11773 Return the current state of the undo tree in a dictionary with
11789 "entries" A list of dictionaries with information about
11793 Each List item is a |Dictionary| with these items:
11827 Return a |List| with all the values of {dict}. The |List| is
11835 position given with {expr}. That is, the last screen position
11839 the <Tab>. For example, for a <Tab> in column 1, with 'ts'
11862 virtcol(".") with text "foo^Lbar", with cursor on the "^L", returns 5
11863 virtcol("$") with text "foo^Lbar", returns 9
11864 virtcol("'t") with text " there", with 't at 'h', returns 6
11896 gracefully. (Makes only sense with |mapmode-c| mappings).
11911 < Doing the same with `setwinvar()` would not trigger
11924 Returns a |List| with |window-ID|s for windows that contain
11935 Without {tab} use the current tab, otherwise the tab with
11967 Go to window with ID {expr}. This may also change the current
11975 Return a list with the tab number and window number of window
11976 with ID {expr}: [tabnr, winnr].
11983 Return the window number of window with ID {expr}.
11990 Return the screen position of window {nr} as a list with two
12012 {options} is a |Dictionary| with the following optional entries:
12014 like with |:vsplit|.
12027 associated with window {nr}. {nr} can be the window number or
12068 with number {tabnr}. If the tabpage {tabnr} is not found,
12086 " The second tab page, with three horizontally split
12087 " windows, with two vertically split windows in the
12123 The number can be used with |CTRL-W_w| and ":wincmd w"
12231 item is separated with a NL. Each list item must be a String
12254 All NL characters are replaced with a NUL character.
12305 acl Compiled with |ACL| support.
12306 all_builtin_terms Compiled with all builtin terminals enabled.
12308 arabic Compiled with Arabic support |Arabic|.
12309 arp Compiled with ARP support (Amiga).
12310 autocmd Compiled with autocommand support. (always true)
12311 autochdir Compiled with support for 'autochdir'
12313 balloon_eval Compiled with |balloon-eval| support.
12316 browse Compiled with |:browse| support, and browse() will
12318 browsefilter Compiled with support for |browsefilter|.
12320 builtin_terms Compiled with some builtin terminals.
12321 byte_offset Compiled with support for 'o' in 'statusline'
12322 channel Compiled with support for |channel| and |job|
12323 cindent Compiled with 'cindent' support.
12324 clientserver Compiled with remote invocation support |clientserver|.
12325 clipboard Compiled with 'clipboard' support.
12326 clipboard_working Compiled with 'clipboard' support and it can be used.
12327 cmdline_compl Compiled with |cmdline-completion| support.
12328 cmdline_hist Compiled with |cmdline-history| support.
12329 cmdline_info Compiled with 'showcmd' and 'ruler' support.
12330 comments Compiled with |'comments'| support.
12333 cryptv Compiled with encryption support |encryption|.
12334 cscope Compiled with |cscope| support.
12335 cursorbind Compiled with |'cursorbind'| (always true)
12336 debug Compiled with "DEBUG" defined.
12337 dialog_con Compiled with console dialog support.
12338 dialog_gui Compiled with GUI dialog support.
12339 diff Compiled with |vimdiff| and 'diff' support.
12340 digraphs Compiled with support for digraphs.
12341 directx Compiled with support for DirectX and 'renderoptions'.
12342 dnd Compiled with support for the "~ register |quote_~|.
12343 drop_file Compiled with |drop_file| support.
12344 ebcdic Compiled on a machine with ebcdic character set.
12345 emacs_tags Compiled with support for Emacs tags.
12346 eval Compiled with expression evaluation support. Always
12349 extra_search Compiled with support for |'incsearch'| and
12352 file_in_path Compiled with support for |gf| and |<cfile>|
12355 find_in_path Compiled with support for include file searches
12357 float Compiled with support for |Float|.
12360 folding Compiled with |folding| support.
12361 footer Compiled with GUI footer support. |gui-footer|
12363 gettext Compiled with message translation |multi-lang|
12364 gui Compiled with GUI enabled.
12365 gui_athena Compiled with Athena GUI.
12366 gui_gnome Compiled with Gnome support (gui_gtk is also defined).
12367 gui_gtk Compiled with GTK+ GUI (any version).
12368 gui_gtk2 Compiled with GTK+ 2 GUI (gui_gtk is also defined).
12369 gui_gtk3 Compiled with GTK+ 3 GUI (gui_gtk is also defined).
12370 gui_haiku Compiled with Haiku GUI.
12371 gui_mac Compiled with Macintosh GUI.
12372 gui_motif Compiled with Motif GUI.
12373 gui_photon Compiled with Photon GUI.
12375 gui_win32 Compiled with MS-Windows Win32 GUI.
12378 hangul_input Compiled with Hangul input support. |hangul|
12381 insert_expand Compiled with support for CTRL-X expansion commands in
12383 job Compiled with support for |channel| and |job|
12384 ipv6 Compiled with support for IPv6 networking in |channel|.
12385 jumplist Compiled with |jumplist| support.
12386 keymap Compiled with 'keymap' support.
12387 lambda Compiled with |lambda| support.
12388 langmap Compiled with 'langmap' support.
12389 libcall Compiled with |libcall()| support.
12390 linebreak Compiled with 'linebreak', 'breakat', 'showbreak' and
12393 lispindent Compiled with support for lisp indenting.
12394 listcmds Compiled with commands for the buffer list |:files|
12396 localmap Compiled with local mappings and abbr. |:map-local|
12397 lua Compiled with Lua interface |Lua|.
12400 menu Compiled with support for |:menu|.
12401 mksession Compiled with support for |:mksession|.
12402 modify_fname Compiled with file name modifiers. |filename-modifiers|
12404 mouse Compiled with support for mouse.
12405 mouse_dec Compiled with support for Dec terminal mouse.
12406 mouse_gpm Compiled with support for gpm (Linux console mouse)
12408 mouse_netterm Compiled with support for netterm mouse.
12409 mouse_pterm Compiled with support for qnx pterm mouse.
12410 mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
12411 mouse_sgr Compiled with support for sgr mouse.
12412 mouse_urxvt Compiled with support for urxvt mouse.
12413 mouse_xterm Compiled with support for xterm mouse.
12414 mouseshape Compiled with support for 'mouseshape'.
12415 multi_byte Compiled with support for 'encoding' (always true)
12417 multi_byte_ime Compiled with support for IME input method.
12418 multi_lang Compiled with support for multiple languages.
12419 mzscheme Compiled with MzScheme interface |mzscheme|.
12420 nanotime Compiled with sub-second time stamp checks.
12421 netbeans_enabled Compiled with support for |netbeans| and connected.
12422 netbeans_intg Compiled with support for |netbeans|.
12423 num64 Compiled with 64-bit |Number| support.
12424 ole Compiled with OLE automation support for Win32.
12426 osxdarwin Compiled for macOS, with |mac-darwin-feature|
12427 packages Compiled with |packages| support.
12428 path_extra Compiled with up/downwards search in 'path' and 'tags'
12429 perl Compiled with Perl interface.
12430 persistent_undo Compiled with support for persistent undo history.
12431 postscript Compiled with PostScript file printing.
12432 printer Compiled with |:hardcopy| support.
12433 profile Compiled with |:profile| support.
12435 python_compiled Compiled with Python 2.x interface. |has-python|
12438 python3_compiled Compiled with Python 3.x interface. |has-python|
12442 quickfix Compiled with |quickfix| support.
12443 reltime Compiled with |reltime()| support.
12444 rightleft Compiled with 'rightleft' support.
12445 ruby Compiled with Ruby interface |ruby|.
12446 scrollbind Compiled with 'scrollbind' support. (always true)
12447 showcmd Compiled with 'showcmd' support.
12448 signs Compiled with |:sign| support.
12449 smartindent Compiled with 'smartindent' support.
12450 sodium Compiled with libsodium for better crypt support
12451 sound Compiled with sound support, e.g. `sound_playevent()`
12452 spell Compiled with spell checking support |spell|.
12453 startuptime Compiled with |--startuptime| support.
12454 statusline Compiled with support for 'statusline', 'rulerformat'
12458 syntax Compiled with syntax highlighting support |syntax|.
12462 tag_binary Compiled with binary searching in tags files
12466 tcl Compiled with Tcl interface.
12467 termguicolors Compiled with true color in terminal support.
12468 terminal Compiled with |terminal| support.
12469 terminfo Compiled with terminfo instead of termcap.
12470 termresponse Compiled with support for |t_RV| and |v:termresponse|.
12471 textobjects Compiled with support for |text-objects|.
12472 textprop Compiled with support for |text-properties|.
12473 tgetent Compiled with tgetent support, able to use a termcap
12475 timers Compiled with |timer_start()| support.
12476 title Compiled with window title support |'title'|.
12477 toolbar Compiled with support for |gui-toolbar|.
12481 unnamedplus Compiled with support for "unnamedplus" in 'clipboard'
12483 vartabs Compiled with variable tabstop support |'vartabstop'|.
12486 vertsplit Compiled with vertically split windows |:vsplit|.
12490 viminfo Compiled with viminfo support.
12494 virtualedit Compiled with 'virtualedit' option. (always true)
12495 visual Compiled with Visual mode. (always true)
12496 visualextra Compiled with extra Visual mode commands. (always
12499 vreplace Compiled with |gR| and |gr| commands. (always true)
12502 wildignore Compiled with 'wildignore' option.
12503 wildmenu Compiled with 'wildmenu' option.
12510 winaltkeys Compiled with 'winaltkeys' option.
12511 windows Compiled with support for more than one window.
12513 writebackup Compiled with 'writebackup' default on.
12514 xfontset Compiled with X fontset support |xfontset|.
12515 xim Compiled with X input method support |xim|.
12516 xpm Compiled with pixmap support.
12517 xpm_w32 Compiled with pixmap support for Win32. (Only for
12519 xsmp Compiled with X session management support.
12520 xsmp_interact Compiled with interactive X session management support.
12521 xterm_clipboard Compiled with support for xterm clipboard.
12522 xterm_save Compiled with support for saving and restoring the
12524 x11 Compiled with X11 support.
12533 line break for the pattern. It can be matched with a "\n" in the pattern, or
12534 with ".". Example: >
12552 commands can be executed with the |:normal| command.
12557 The function name must start with an uppercase letter, to avoid confusion with
12559 avoid obvious, short names. A good habit is to start the function name with
12566 A function local to a script must start with "s:". A local script function
12582 :fu[nction] /{pattern} List functions with a name matching {pattern}.
12583 Example that lists all functions ending with "File": >
12603 '_', and must start with a capital or "s:" (see
12616 function can only be used with a |Funcref| and will be
12640 each line in the range, with the cursor on the start
12643 range, as is the case with all Ex commands.
12753 This only works for functions declared with `:function` or `:def`, not for
12778 Optional arguments with default expressions must occur after any mandatory
12782 but not the other way around. They must be prefixed with "a:", as with all
12799 function returns. Global variables need to be accessed with "g:".
12812 This function can then be called with: >
12824 This function can then be called with: >
12833 are as specified with `:function`. Up to 20 arguments can be
12841 with the cursor in the first column of that line. The cursor
12871 The recursiveness of user functions is restricted with the |'maxfuncdepth'|
12887 only when they are used. There are two methods: with an autocommand and with
12896 You can define the autocommand and quickly quit the script with `:finish`.
12900 Use the FuncUndefined autocommand event with a pattern that matches the
12905 The file "~/vim/bufnetfuncs.vim" should then define functions that start with
12969 Hint: If you distribute a bunch of scripts you can pack them together with the
12976 variable. This is a regular variable name with one or more expressions
13046 the expression {expr1}, which must be a list with the
13064 `.=` is not supported with Vim script version 2 and
13188 {endmarker} cannot start with a lower case character.
13189 The last line should end only with the {endmarker}
13203 The marker must line up with "let" and the indentation
13293 the variable with |:lockvar| just after |:let|, thus: >
13356 Example with [depth] 0: >
13394 You can use this to remain compatible with older
13400 "endif". Sometimes an older Vim has a problem with a
13417 :elsei[f] {expr1} Short for ":else" ":if", with the addition that there
13449 before executing the commands with the current item.
13457 < Note that reordering the |List| (e.g., with sort() or
13461 iterate over. Unlike with |List|, modifying the
13524 error exception is not caught, always beginning with
13589 :ec[ho] {expr1} .. Echoes each {expr1}, with a space in between. The
13601 finished with a sequence of commands this happens
13605 with the |:redraw| command. Example: >
13642 Spaces are placed between the arguments as with the
13659 Spaces are placed between the arguments as with the
13680 the `append()` call appends the List with text to the
13681 buffer. This is similar to `:call` but works with any
13695 Multiple arguments are concatenated, with a space in
13765 A try conditional begins with a |:try| command and ends at the matching
13795 script continues with the line following the ":endtry".
13929 Exceptions can be caught by a try conditional with one or more |:catch|
14102 catching it. You can solve these problems by using a try conditional with
14209 when the error occurs outside try conditionals. It always begins with
14239 E128: Function name must start with a capital: nofunc
14241 Vim(function):E128: Function name must start with a capital: nofunc
14243 Vim(delfunction):E128: Function name must start with a capital: nofunc
14342 : " Caught the interrupt. Continue with next prompt.
14560 pass additional information with the object of an exception class. You can do
14563 class name with the components separated by a colon, for instance throw the
14565 When you want to pass additional information with your exception class, add
14570 parentheses can be cut out from |v:exception| with the ":substitute" command.
14608 : " something with arithmetics and I/O
14632 exceptions with the "Vim" prefix; they are reserved for Vim.
14633 Vim error exceptions are parameterized with the name of the command that
14684 : echo "in catch with syntax error"
14760 :" binary string, separated with dashes.
14778 This example sorts lines with a specific compare function. >
14842 checked with the |has()| and |exists()| functions.
14847 compatible with older versions of Vim this will give an explicit error,
14854 Test for support with: >
14859 < String concatenation with "." is not supported, use ".." instead.
14869 Test for support with: >
14874 < Numbers with a leading zero are not recognized as octal. "0o" or "0O"
14880 < with script version 4: >
14889 Test for support with: >
14915 echo "commands executed with +eval"