@@ -505,6 +505,7 @@ setbufvar({buf}, {varname}, {val})
505505setcellwidths({list} ) none set character cell width overrides
506506setcharpos({expr} , {list} ) Number set the {expr} position to {list}
507507setcharsearch({dict} ) Dict set character search from {dict}
508+ setcmdline({str} [, {pos} ]) Number set command-line
508509setcmdpos({pos} ) Number set cursor position in command-line
509510setcursorcharpos({list} ) Number move cursor to position in {list}
510511setenv({name} , {val} ) none set environment variable
@@ -3425,7 +3426,8 @@ getcmdcompltype() *getcmdcompltype()*
34253426 Only works when the command line is being edited, thus
34263427 requires use of | c_CTRL-\_e | or | c_CTRL-R_= | .
34273428 See | :command-completion | for the return string.
3428- Also see | getcmdtype() | , | setcmdpos() | and | getcmdline() | .
3429+ Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | and
3430+ | setcmdline() | .
34293431 Returns an empty string when completion is not defined.
34303432
34313433getcmdline() *getcmdline()*
@@ -3434,7 +3436,8 @@ getcmdline() *getcmdline()*
34343436 | c_CTRL-R_= | .
34353437 Example: >
34363438 :cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
3437- < Also see | getcmdtype() | , | getcmdpos() | and | setcmdpos() | .
3439+ < Also see | getcmdtype() | , | getcmdpos() | , | setcmdpos() | and
3440+ | setcmdline() | .
34383441 Returns an empty string when entering a password or using
34393442 | inputsecret() | .
34403443
@@ -3444,7 +3447,8 @@ getcmdpos() *getcmdpos()*
34443447 Only works when editing the command line, thus requires use of
34453448 | c_CTRL-\_e | or | c_CTRL-R_= | or an expression mapping.
34463449 Returns 0 otherwise.
3447- Also see | getcmdtype() | , | setcmdpos() | and | getcmdline() | .
3450+ Also see | getcmdtype() | , | setcmdpos() | , | getcmdline() | and
3451+ | setcmdline() | .
34483452
34493453getcmdscreenpos() *getcmdscreenpos()*
34503454 Return the screen position of the cursor in the command line
@@ -3453,7 +3457,8 @@ getcmdscreenpos() *getcmdscreenpos()*
34533457 Only works when editing the command line, thus requires use of
34543458 | c_CTRL-\_e | or | c_CTRL-R_= | or an expression mapping.
34553459 Returns 0 otherwise.
3456- Also see | getcmdpos() | , | setcmdpos() | .
3460+ Also see | getcmdpos() | , | setcmdpos() | , | getcmdline() | and
3461+ | setcmdline() | .
34573462
34583463getcmdtype() *getcmdtype()*
34593464 Return the current command-line type. Possible return values
@@ -7925,6 +7930,16 @@ setcharsearch({dict}) *setcharsearch()*
79257930 Can also be used as a | method | : >
79267931 SavedSearch()->setcharsearch()
79277932
7933+ setcmdline({str} [, {pos} ]) *setcmdline()*
7934+ Set the command line to {str} and set the cursor position to
7935+ {pos} .
7936+ If {pos} is omitted, the cursor is positioned after the text.
7937+ Returns 0 when successful, 1 when not editing the command
7938+ line.
7939+
7940+ Can also be used as a | method | : >
7941+ GetText()->setcmdline()
7942+
79287943 setcmdpos({pos} ) *setcmdpos()*
79297944 Set the cursor position in the command line to byte position
79307945 {pos} . The first position is 1.
@@ -7937,8 +7952,8 @@ setcmdpos({pos}) *setcmdpos()*
79377952 before inserting the resulting text.
79387953 When the number is too big the cursor is put at the end of the
79397954 line. A number smaller than one has undefined results.
7940- Returns FALSE when successful, TRUE when not editing the
7941- command line.
7955+ Returns 0 when successful, 1 when not editing the command
7956+ line.
79427957
79437958 Can also be used as a | method | : >
79447959 GetPos()->setcmdpos()
0 commit comments