Add a new attribute to command and offer some functions to change Vim-modes more free.
I want to use a command to accomplish these:
setcmdline().But the problem: after running the Vim command, Vim will enter into the normal mode automatically, in which setcmdline() takes no effect.
The alternatives I've considered, but I prefer not to adopt them for some personal reasions:
feedkeys(): it's hacky;map, setcmdline(): for example, cnoremap kk <Cmd>call setcmdline(':echon 1')<CR>: I don't want use map, but just want to use the "command" way!input(): it cannot lead to the command-line mode.-nargs attribute of command: it's too rigid to make make changes to the command content.So, the feature requests or solutions I'd like are:
:startcmdline, just like :startinsert) and a function( for example, setcmdmode(), just like setcmdline()) to enter into and stay in the command-line mode, by which user can use setcmdline() to input some new commands.
setnormalmode(), setinsertmode() are also needed.command, to make command work like <Cmd> -- it begins a "new command mapping", and executes the command directly without changing modes.--Thanks for the valuable contributions to Vim!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()