1- *eval.txt* For Vim version 7.4. Last change: 2013 Aug 24
1+ *eval.txt* For Vim version 7.4. Last change: 2013 Nov 08
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1455,6 +1455,13 @@ v:foldend Used for 'foldtext': last line of closed fold.
14551455v:foldstart Used for 'foldtext' : first line of closed fold.
14561456 Read-only in the | sandbox | . | fold-foldtext |
14571457
1458+ *v:hlsearch* *hlsearch-variable*
1459+ v:hlsearch Variable that determines whether search highlighting is on.
1460+ Makes sense only if 'hlsearch' is enabled which requires
1461+ | +extra_search | . Setting this variable to zero acts the like
1462+ | :nohlsearch | command, setting it to one acts like >
1463+ let &hlsearch = &hlsearch
1464+ <
14581465 *v:insertmode* *insertmode-variable*
14591466v:insertmode Used for the | InsertEnter | and | InsertChange | autocommand
14601467 events. Values:
@@ -1713,6 +1720,7 @@ bufnr( {expr}) Number Number of the buffer {expr}
17131720bufwinnr( {expr} ) Number window number of buffer {expr}
17141721byte2line( {byte} ) Number line number at byte count {byte}
17151722byteidx( {expr} , {nr} ) Number byte index of {nr} 'th char in {expr}
1723+ byteidxcomp( {expr} , {nr} ) Number byte index of {nr} 'th char in {expr}
17161724call( {func} , {arglist} [, {dict} ])
17171725 any call {func} with arguments {arglist}
17181726ceil( {expr} ) Float round {expr} up
@@ -2261,7 +2269,10 @@ byteidx({expr}, {nr}) *byteidx()*
22612269 {expr} . Use zero for the first character, it returns zero.
22622270 This function is only useful when there are multibyte
22632271 characters, otherwise the returned value is equal to {nr} .
2264- Composing characters are counted as a separate character.
2272+ Composing characters are not counted separately, their byte
2273+ length is added to the preceding base character. See
2274+ | byteidxcomp() | below for counting composing characters
2275+ separately.
22652276 Example : >
22662277 echo matchstr(str, ".", byteidx(str, 3))
22672278< will display the fourth character. Another way to do the
@@ -2270,7 +2281,20 @@ byteidx({expr}, {nr}) *byteidx()*
22702281 echo strpart(s, 0, byteidx(s, 1))
22712282< If there are less than {nr} characters -1 is returned.
22722283 If there are exactly {nr} characters the length of the string
2273- is returned.
2284+ in bytes is returned.
2285+
2286+ byteidxcomp({expr} , {nr} ) *byteidxcomp()*
2287+ Like byteidx(), except that a composing character is counted
2288+ as a separate character. Example: >
2289+ let s = 'e' . nr2char(0x301)
2290+ echo byteidx(s, 1)
2291+ echo byteidxcomp(s, 1)
2292+ echo byteidxcomp(s, 2)
2293+ < The first and third echo result in 3 ('e' plus composing
2294+ character is 3 bytes), the second echo results in 1 ('e' is
2295+ one byte).
2296+ Only works different from byteidx() when 'encoding' is set to
2297+ a Unicode encoding.
22742298
22752299call({func} , {arglist} [, {dict} ]) *call()* *E699*
22762300 Call function {func} with the items in | List | {arglist} as
@@ -4211,6 +4235,9 @@ matchadd({group}, {pattern}[, {priority}[, {id}]])
42114235 "match"). It will be highlighted with {group} . Returns an
42124236 identification number (ID), which can be used to delete the
42134237 match using | matchdelete() | .
4238+ Matching is case sensitive and magic, unless case sensitivity
4239+ or magicness are explicitly overridden in {pattern} . The
4240+ 'magic' , 'smartcase' and 'ignorecase' options are not used.
42144241
42154242 The optional {priority} argument assigns a priority to the
42164243 match. A match with a high priority will have its
0 commit comments