|
1 |
| -*eval.txt* For Vim version 7.4. Last change: 2016 Jan 16 |
| 1 | +*eval.txt* For Vim version 7.4. Last change: 2016 Jan 17 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -873,7 +873,7 @@ cursor: >
|
873 | 873 | :let c = getline(".")[col(".") - 1]
|
874 | 874 |
|
875 | 875 | If the length of the String is less than the index, the result is an empty
|
876 |
| -String. A negative index always results in an empty string (reason: backwards |
| 876 | +String. A negative index always results in an empty string (reason: backward |
877 | 877 | compatibility). Use [-1:] to get the last byte.
|
878 | 878 |
|
879 | 879 | If expr8 is a |List| then it results the item at index expr1. See |list-index|
|
@@ -1851,7 +1851,7 @@ getcmdpos() Number return cursor position in command-line
|
1851 | 1851 | getcmdtype() String return current command-line type
|
1852 | 1852 | getcmdwintype() String return current command-line window type
|
1853 | 1853 | getcurpos() List position of the cursor
|
1854 |
| -getcwd() String the current working directory |
| 1854 | +getcwd( [{winnr} [, {tabnr}]]) String get the current working directory |
1855 | 1855 | getfontname( [{name}]) String name of font being used
|
1856 | 1856 | getfperm( {fname}) String file permissions of file {fname}
|
1857 | 1857 | getfsize( {fname}) Number size in bytes of file {fname}
|
@@ -1882,7 +1882,8 @@ globpath( {path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]])
|
1882 | 1882 | String do glob({expr}) for all dirs in {path}
|
1883 | 1883 | has( {feature}) Number TRUE if feature {feature} supported
|
1884 | 1884 | has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
|
1885 |
| -haslocaldir() Number TRUE if current window executed |:lcd| |
| 1885 | +haslocaldir( [{winnr} [, {tabnr}]]) |
| 1886 | + Number TRUE if the window executed |:lcd| |
1886 | 1887 | hasmapto( {what} [, {mode} [, {abbr}]])
|
1887 | 1888 | Number TRUE if mapping to {what} exists
|
1888 | 1889 | histadd( {history},{item}) String add an item to a history
|
@@ -1950,6 +1951,7 @@ nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
|
1950 | 1951 | nr2char( {expr}[, {utf8}]) String single char with ASCII/UTF8 value {expr}
|
1951 | 1952 | or( {expr}, {expr}) Number bitwise OR
|
1952 | 1953 | pathshorten( {expr}) String shorten directory names in a path
|
| 1954 | +perleval( {expr}) any evaluate |Perl| expression |
1953 | 1955 | pow( {x}, {y}) Float {x} to the power of {y}
|
1954 | 1956 | prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
|
1955 | 1957 | printf( {fmt}, {expr1}...) String format text
|
@@ -3521,8 +3523,16 @@ getcurpos() Get the position of the cursor. This is like getpos('.'), but
|
3521 | 3523 | call setpos('.', save_cursor)
|
3522 | 3524 | <
|
3523 | 3525 | *getcwd()*
|
3524 |
| -getcwd() The result is a String, which is the name of the current |
| 3526 | +getcwd([{winnr} [, {tabnr}]]) |
| 3527 | + The result is a String, which is the name of the current |
3525 | 3528 | working directory.
|
| 3529 | + Without arguments, for the current window. |
| 3530 | + |
| 3531 | + With {winnr} return the local current directory of this window |
| 3532 | + in the current tab page. |
| 3533 | + With {winnr} and {tabnr} return the local current directory of |
| 3534 | + the window in the specified tab page. |
| 3535 | + Return an empty string if the arguments are invalid. |
3526 | 3536 |
|
3527 | 3537 | getfsize({fname}) *getfsize()*
|
3528 | 3538 | The result is a Number, which is the size in bytes of the
|
@@ -3858,9 +3868,15 @@ has_key({dict}, {key}) *has_key()*
|
3858 | 3868 | The result is a Number, which is 1 if |Dictionary| {dict} has
|
3859 | 3869 | an entry with key {key}. Zero otherwise.
|
3860 | 3870 |
|
3861 |
| -haslocaldir() *haslocaldir()* |
3862 |
| - The result is a Number, which is 1 when the current |
3863 |
| - window has set a local path via |:lcd|, and 0 otherwise. |
| 3871 | +haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()* |
| 3872 | + The result is a Number, which is 1 when the window has set a |
| 3873 | + local path via |:lcd|, and 0 otherwise. |
| 3874 | + |
| 3875 | + Without arguments use the current window. |
| 3876 | + With {winnr} use this window in the current tab page. |
| 3877 | + With {winnr} and {tabnr} use the window in the specified tab |
| 3878 | + page. |
| 3879 | + Return 0 if the arguments are invalid. |
3864 | 3880 |
|
3865 | 3881 | hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
|
3866 | 3882 | The result is a Number, which is 1 if there is a mapping that
|
@@ -4547,8 +4563,8 @@ matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]])
|
4547 | 4563 | respectively. If the {id} argument is not specified or -1,
|
4548 | 4564 | |matchadd()| automatically chooses a free ID.
|
4549 | 4565 |
|
4550 |
| - The optional {dict} argmument allows for further custom |
4551 |
| - values. Currently this is used to specify a match specifc |
| 4566 | + The optional {dict} argument allows for further custom |
| 4567 | + values. Currently this is used to specify a match specific |
4552 | 4568 | conceal character that will be shown for |hl-Conceal|
|
4553 | 4569 | highlighted matches. The dict can have the following members:
|
4554 | 4570 |
|
@@ -4778,6 +4794,17 @@ pathshorten({expr}) *pathshorten()*
|
4778 | 4794 | < ~/.v/a/myfile.vim ~
|
4779 | 4795 | It doesn't matter if the path exists or not.
|
4780 | 4796 |
|
| 4797 | +perleval({expr}) *perleval()* |
| 4798 | + Evaluate Perl expression {expr} in scalar context and return |
| 4799 | + its result converted to Vim data structures. If value can't be |
| 4800 | + converted, it is returned as a string Perl representation. |
| 4801 | + Note: If you want an array or hash, {expr} must return a |
| 4802 | + reference to it. |
| 4803 | + Example: > |
| 4804 | + :echo perleval('[1 .. 4]') |
| 4805 | +< [1, 2, 3, 4] |
| 4806 | + {only available when compiled with the |+perl| feature} |
| 4807 | + |
4781 | 4808 | pow({x}, {y}) *pow()*
|
4782 | 4809 | Return the power of {x} to the exponent {y} as a |Float|.
|
4783 | 4810 | {x} and {y} must evaluate to a |Float| or a |Number|.
|
@@ -5292,7 +5319,7 @@ search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()*
|
5292 | 5319 |
|
5293 | 5320 | 'ignorecase', 'smartcase' and 'magic' are used.
|
5294 | 5321 |
|
5295 |
| - When the 'z' flag is not given seaching always starts in |
| 5322 | + When the 'z' flag is not given, searching always starts in |
5296 | 5323 | column zero and then matches before the cursor are skipped.
|
5297 | 5324 | When the 'c' flag is present in 'cpo' the next search starts
|
5298 | 5325 | after the match. Without the 'c' flag the next search starts
|
@@ -7658,7 +7685,7 @@ This does NOT work: >
|
7658 | 7685 | From Vim version 4.5 until 5.0, every Ex command in
|
7659 | 7686 | between the ":if" and ":endif" is ignored. These two
|
7660 | 7687 | commands were just to allow for future expansions in a
|
7661 |
| - backwards compatible way. Nesting was allowed. Note |
| 7688 | + backward compatible way. Nesting was allowed. Note |
7662 | 7689 | that any ":else" or ":elseif" was ignored, the "else"
|
7663 | 7690 | part was not executed either.
|
7664 | 7691 |
|
|
0 commit comments