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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -232,8 +232,9 @@ getcharsearch() Dict last character search
232
232
getcharstr([{expr} ]) String get one character from the user
233
233
getcmdcompltype() String return the type of the current
234
234
command-line completion
235
- getcmdline() String return the current command-line
235
+ getcmdline() String return the current command-line input
236
236
getcmdpos() Number return cursor position in command-line
237
+ getcmdprompt() String return the current command-line prompt
237
238
getcmdscreenpos() Number return cursor screen position in
238
239
command-line
239
240
getcmdtype() String return current command-line type
@@ -3978,21 +3979,21 @@ getcmdcompltype() *getcmdcompltype()*
3978
3979
Only works when the command line is being edited, thus
3979
3980
requires use of | c_CTRL-\_e | or | c_CTRL-R_= | .
3980
3981
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() | .
3983
3984
Returns an empty string when completion is not defined.
3984
3985
3985
3986
Return type: | String |
3986
3987
3987
3988
3988
3989
getcmdline() *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_=| .
3992
3993
Example: >
3993
3994
: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() | .
3996
3997
Returns an empty string when entering a password or using
3997
3998
| inputsecret() | .
3998
3999
@@ -4005,12 +4006,23 @@ getcmdpos() *getcmdpos()*
4005
4006
Only works when editing the command line, thus requires use of
4006
4007
| c_CTRL-\_e | or | c_CTRL-R_= | or an expression mapping.
4007
4008
Returns 0 otherwise.
4008
- Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | and
4009
- | setcmdline() | .
4009
+ Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | ,
4010
+ | getcmdprompt() | and | setcmdline() | .
4010
4011
4011
4012
Return type: | Number |
4012
4013
4013
4014
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
+
4014
4026
getcmdscreenpos() *getcmdscreenpos()*
4015
4027
Return the screen position of the cursor in the command line
4016
4028
as a byte count. The first column is 1.
0 commit comments