Mercurial > vim
comparison runtime/doc/eval.txt @ 6918:2def7b25de60
Updated runtime files.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 10 Jul 2015 19:31:35 +0200 |
parents | 676906c33768 |
children | 4db70c94226b |
comparison
equal
deleted
inserted
replaced
6917:995526b3f104 | 6918:2def7b25de60 |
---|---|
1 *eval.txt* For Vim version 7.4. Last change: 2015 Jun 26 | 1 *eval.txt* For Vim version 7.4. Last change: 2015 Jul 10 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
1466 v:hlsearch Variable that indicates whether search highlighting is on. | 1466 v:hlsearch Variable that indicates whether search highlighting is on. |
1467 Setting it makes sense only if 'hlsearch' is enabled which | 1467 Setting it makes sense only if 'hlsearch' is enabled which |
1468 requires |+extra_search|. Setting this variable to zero acts | 1468 requires |+extra_search|. Setting this variable to zero acts |
1469 the like |:nohlsearch| command, setting it to one acts like > | 1469 the like |:nohlsearch| command, setting it to one acts like > |
1470 let &hlsearch = &hlsearch | 1470 let &hlsearch = &hlsearch |
1471 < | 1471 < Note that the value is restored when returning from a |
1472 function. |function-search-undo|. | |
1473 | |
1472 *v:insertmode* *insertmode-variable* | 1474 *v:insertmode* *insertmode-variable* |
1473 v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand | 1475 v:insertmode Used for the |InsertEnter| and |InsertChange| autocommand |
1474 events. Values: | 1476 events. Values: |
1475 i Insert mode | 1477 i Insert mode |
1476 r Replace mode | 1478 r Replace mode |
4893 Read file {fname} and return a |List|, each line of the file | 4895 Read file {fname} and return a |List|, each line of the file |
4894 as an item. Lines broken at NL characters. Macintosh files | 4896 as an item. Lines broken at NL characters. Macintosh files |
4895 separated with CR will result in a single long line (unless a | 4897 separated with CR will result in a single long line (unless a |
4896 NL appears somewhere). | 4898 NL appears somewhere). |
4897 All NUL characters are replaced with a NL character. | 4899 All NUL characters are replaced with a NL character. |
4898 When {binary/append} contains "b" binary mode is used: | 4900 When {binary} contains "b" binary mode is used: |
4899 - When the last line ends in a NL an extra empty list item is | 4901 - When the last line ends in a NL an extra empty list item is |
4900 added. | 4902 added. |
4901 - No CR characters are removed. | 4903 - No CR characters are removed. |
4902 Otherwise: | 4904 Otherwise: |
4903 - CR characters that appear before a NL are removed. | 4905 - CR characters that appear before a NL are removed. |
5850 in String {expr}. | 5852 in String {expr}. |
5851 When {skipcc} is omitted or zero, composing characters are | 5853 When {skipcc} is omitted or zero, composing characters are |
5852 counted separately. | 5854 counted separately. |
5853 When {skipcc} set to 1, Composing characters are ignored. | 5855 When {skipcc} set to 1, Composing characters are ignored. |
5854 Also see |strlen()|, |strdisplaywidth()| and |strwidth()|. | 5856 Also see |strlen()|, |strdisplaywidth()| and |strwidth()|. |
5857 | |
5858 | |
5859 {skipcc} is only available after 7.4.755. For backward | |
5860 compatibility, you can define a wrapper function: > | |
5861 if has("patch-7.4.755") | |
5862 function s:strchars(str, skipcc) | |
5863 return strchars(a:str, a:skipcc) | |
5864 endfunction | |
5865 else | |
5866 function s:strchars(str, skipcc) | |
5867 if a:skipcc | |
5868 return strlen(substitute(a:str, ".", "x", "g")) | |
5869 else | |
5870 return strchars(a:str) | |
5871 endif | |
5872 endfunction | |
5873 endif | |
5874 < | |
5855 | 5875 |
5856 strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* | 5876 strdisplaywidth({expr}[, {col}]) *strdisplaywidth()* |
5857 The result is a Number, which is the number of display cells | 5877 The result is a Number, which is the number of display cells |
5858 String {expr} occupies on the screen when it starts at {col}. | 5878 String {expr} occupies on the screen when it starts at {col}. |
5859 When {col} is omitted zero is used. Otherwise it is the | 5879 When {col} is omitted zero is used. Otherwise it is the |