getcharsearch().forward ? ',' : ';'
< Also see |setcharsearch()|.
Return: ~
(`table`)
getcharstr([{expr} [, {opts}]]) *getcharstr()*
The same as |getchar()|, except that this always returns a
String, and "number" isn't allowed in {opts}.
Parameters: ~
• {expr} (`-1|0|1?`)
• {opts} (`table?`)
Return: ~
(`string`)
getcmdcomplpat() *getcmdcomplpat()*
Return completion pattern of the current command-line.
Only works when the command line is being edited, thus
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|getcmdprompt()|, |getcmdcompltype()| and |setcmdline()|.
Returns an empty string when completion is not defined.
Return: ~
(`string`)
getcmdcompltype() *getcmdcompltype()*
Return the type of the current command-line completion.
Only works when the command line is being edited, thus
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
See |:command-completion| for the return string.
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
Returns an empty string when completion is not defined.
Return: ~
(`string`)
getcmdline() *getcmdline()*
Return the current command-line input. Only works when the
command line is being edited, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=|.
Example: >vim
cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
< Also see |getcmdtype()|, |getcmdpos()|, |setcmdpos()|,
|getcmdprompt()| and |setcmdline()|.
Returns an empty string when entering a password or using
|inputsecret()|.
Return: ~
(`string`)
getcmdpos() *getcmdpos()*
Return the position of the cursor in the command line as a
byte count. The first column is 1.
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns 0 otherwise.
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|getcmdprompt()| and |setcmdline()|.
Return: ~
(`integer`)
getcmdprompt() *getcmdprompt()*
Return the current command-line prompt when using functions
like |input()| or |confirm()|.
Only works when the command line is being edited, thus
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
Also see |getcmdtype()|, |getcmdline()|, |getcmdpos()|,
|setcmdpos()| and |setcmdline()|.
Return: ~
(`string`)
getcmdscreenpos() *getcmdscreenpos()*
Return the screen position of the cursor in the command line
as a byte count. The first column is 1.
Instead of |getcmdpos()|, it adds the prompt position.
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns 0 otherwise.
Also see |getcmdpos()|, |setcmdpos()|, |getcmdline()| and
|setcmdline()|.
Return: ~
(`integer`)
getcmdtype() *getcmdtype()*
Return the current command-line type. Possible return values
are:
: normal Ex command
> debug mode command |debug-mode|
/ forward search command
? backward search command
@ |input()| command
`-` |:insert| or |:append| command
= |i_CTRL-R_=|
Only works when editing the command line, thus requires use of
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
Returns an empty string otherwise.
Also see |getcmdpos()|, |setcmdpos()|