evil
evil copied to clipboard
Allow keybinding symbols in :normal command
Allow unquoted keybinding symbols (e.g. \<C-w>
, \<esc>
, etc) in the normal command (as described by the vim docs) would be great, since it would make the normal command useful for doing things that jump in and out of normal mode.
For example, the following:
:normal iType This Out\<cr>Type this out\<esc>
:normal iType This Out\<esc>oType it out again\<esc>
Would produce this in an empty buffer, and leave the cursor at the end of the last line:
Type this out
Type it out again
Semi-related to #1361
Have you tried quoted-insert
? It should be bound to C-v
in the minibuffer.
With it you can enter literal key characters such as C-a
or more importantly escape
. so you can do something like:
-
:norm Afoo
-
C-v ESC
-
0ibar
and you can exit insert state in normal commands. Pretty sure vim also supports this.
Just tried playing around w/ quoted insert. I musta broken something in my meddling, cause :norm
isn't working for me in general. It seems like a pretty OK workaround, though I'd still like to see \<KBD>
parising in :norm
commands. That's just my take xP.
Thanks for the tip though! Didn't know quoted-insert
was a thing.
Just tested C-v
, and it works pretty pretty well, although it does pollute the exec history if the user tries any :
statements inside of their norm string.