1- *builtin.txt* For Vim version 9.0. Last change: 2022 Nov 09
1+ *builtin.txt* For Vim version 9.0. Last change: 2022 Nov 14
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -116,13 +116,13 @@ ch_status({handle} [, {options}])
116116changenr() Number current change number
117117char2nr({expr} [, {utf8} ]) Number ASCII/UTF-8 value of first char in {expr}
118118charclass({string} ) Number character class of {string}
119- charcol({expr} ) Number column number of cursor or mark
119+ charcol({expr} [, {winid} ]) Number column number of cursor or mark
120120charidx({string} , {idx} [, {countcc} ])
121121 Number char index of byte {idx} in {string}
122122chdir({dir} ) String change current working directory
123123cindent({lnum} ) Number C indent for line {lnum}
124124clearmatches([{win} ]) none clear all matches
125- col({expr} ) Number column byte index of cursor or mark
125+ col({expr} [, {winid} ]) Number column byte index of cursor or mark
126126complete({startcol} , {matches} ) none set Insert mode completion
127127complete_add({expr} ) Number add completion match
128128complete_check() Number check for key typed during completion
@@ -246,6 +246,7 @@ getloclist({nr}, {what}) Dict get specific location list properties
246246getmarklist([{buf} ]) List list of global/local marks
247247getmatches([{win} ]) List list of current matches
248248getmousepos() Dict last known mouse position
249+ getmouseshape() String current mouse shape name
249250getpid() Number process ID of Vim
250251getpos({expr} ) List position of cursor, mark, etc.
251252getqflist() List list of quickfix items
@@ -1476,7 +1477,7 @@ charclass({string}) *charclass()*
14761477 Returns 0 if {string} is not a | String | .
14771478
14781479
1479- charcol({expr} ) *charcol()*
1480+ charcol({expr} [, {winid} ]) *charcol()*
14801481 Same as | col() | but returns the character index of the column
14811482 position given with {expr} instead of the byte position.
14821483
@@ -1559,8 +1560,8 @@ clearmatches([{win}]) *clearmatches()*
15591560 Can also be used as a | method | : >
15601561 GetWin()->clearmatches()
15611562<
1562- *col()*
1563- col( {expr} ) The result is a Number, which is the byte index of the column
1563+ col( {expr} [, {winid} ) *col()*
1564+ The result is a Number, which is the byte index of the column
15641565 position given with {expr} . The accepted positions are:
15651566 . the cursor position
15661567 $ the end of the cursor line (the result is the
@@ -1575,6 +1576,8 @@ col({expr}) The result is a Number, which is the byte index of the column
15751576 and column number. Most useful when the column is "$", to get
15761577 the last column of a specific line. When "lnum" or "col" is
15771578 out of range then col() returns zero.
1579+ With the optional {winid} argument the values are obtained for
1580+ that window instead of the current window.
15781581 To get the line number use | line() | . To get both use
15791582 | getpos() | .
15801583 For the screen column position use | virtcol() | . For the
@@ -1585,7 +1588,8 @@ col({expr}) The result is a Number, which is the byte index of the column
15851588 col("$") length of cursor line plus one
15861589 col("'t") column of mark t
15871590 col("'" .. markname) column of mark markname
1588- < The first column is 1. Returns 0 if {expr} is invalid.
1591+ < The first column is 1. Returns 0 if {expr} is invalid or when
1592+ the window with ID {winid} is not found.
15891593 For an uppercase mark the column may actually be in another
15901594 buffer.
15911595 For the cursor position, when 'virtualedit' is active, the
@@ -3878,6 +3882,12 @@ getmousepos() *getmousepos()*
38783882 When using | getchar() | the Vim variables | v:mouse_lnum | ,
38793883 | v:mouse_col | and | v:mouse_winid | also provide these values.
38803884
3885+ getmouseshape() *getmouseshape()*
3886+ Returns the name of the currently showing mouse pointer.
3887+ When the | +mouseshape | feature is not supported or the shape
3888+ is unknown an empty string is returned.
3889+ This function is mainly intended for testing.
3890+
38813891 *getpid()*
38823892getpid() Return a Number which is the process ID of the Vim process.
38833893 On Unix and MS-Windows this is a unique number, until Vim
0 commit comments