It's possible to configure a mapping such that command line mode is active after the key press.
For example, with a mapping :map H :help
, pressing H
results in command line mode being entered with :help
as the current text.
The documentation for :normal
says:
A ":" command must be completed as well. And you can't use "Q" or "gQ" to start Ex mode.
Therefore, it's not possible to execute :normal :
and end up in command line mode.
Are there commands such that command line mode is active upon completion?
Can a Vimscript function be used where command line mode is active with some specified text, after running the function directly (i.e., via a :call
entered in isolation, as opposed to being wrapped in a mapping that can result in command line mode)?
nnoremap <leader>x :
) that leaves you on command line. Don't know if that helps you... (oops...Luc's answer hadn't shown up for me before I hit send..oh well, I'll leave it since it's related)