1- *builtin.txt* For Vim version 9.1. Last change: 2024 Sep 10
1+ *builtin.txt* For Vim version 9.1. Last change: 2024 Sep 23
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -232,8 +232,9 @@ getcharsearch() Dict last character search
232232getcharstr([{expr} ]) String get one character from the user
233233getcmdcompltype() String return the type of the current
234234 command-line completion
235- getcmdline() String return the current command-line
235+ getcmdline() String return the current command-line input
236236getcmdpos() Number return cursor position in command-line
237+ getcmdprompt() String return the current command-line prompt
237238getcmdscreenpos() Number return cursor screen position in
238239 command-line
239240getcmdtype() String return current command-line type
@@ -3978,21 +3979,21 @@ getcmdcompltype() *getcmdcompltype()*
39783979 Only works when the command line is being edited, thus
39793980 requires use of | c_CTRL-\_e | or | c_CTRL-R_= | .
39803981 See | :command-completion | for the return string.
3981- Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | and
3982- | setcmdline() | .
3982+ Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | ,
3983+ | getcmdprompt() | and | setcmdline() | .
39833984 Returns an empty string when completion is not defined.
39843985
39853986 Return type: | String |
39863987
39873988
39883989getcmdline() *getcmdline()*
3989- Return the current command-line. Only works when the command
3990- line is being edited, thus requires use of | c_CTRL-\_e | or
3991- | c_CTRL-R_= | .
3990+ Return the current command-line input . Only works when the
3991+ command line is being edited, thus requires use of
3992+ | c_CTRL-\_e | or | c_CTRL- R_=| .
39923993 Example: >
39933994 :cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
3994- < Also see | getcmdtype() | , | getcmdpos() | , | setcmdpos() | and
3995- | setcmdline() | .
3995+ < Also see | getcmdtype() | , | getcmdpos() | , | setcmdpos() | ,
3996+ | getcmdprompt() | and | setcmdline() | .
39963997 Returns an empty string when entering a password or using
39973998 | inputsecret() | .
39983999
@@ -4005,12 +4006,23 @@ getcmdpos() *getcmdpos()*
40054006 Only works when editing the command line, thus requires use of
40064007 | c_CTRL-\_e | or | c_CTRL-R_= | or an expression mapping.
40074008 Returns 0 otherwise.
4008- Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | and
4009- | setcmdline() | .
4009+ Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | ,
4010+ | getcmdprompt() | and | setcmdline() | .
40104011
40114012 Return type: | Number |
40124013
40134014
4015+ getcmdprompt() *getcmdprompt()*
4016+ Return the current command-line prompt when using functions
4017+ like | input() | or | confirm() | .
4018+ Only works when the command line is being edited, thus
4019+ requires use of | c_CTRL-\_e | or | c_CTRL-R_= | .
4020+ Also see | getcmdtype() | , | getcmdline() | , | getcmdpos() | ,
4021+ | setcmdpos() | and | setcmdline() | .
4022+
4023+ Return type: | String |
4024+
4025+
40144026getcmdscreenpos() *getcmdscreenpos()*
40154027 Return the screen position of the cursor in the command line
40164028 as a byte count. The first column is 1.
0 commit comments