Yesterday I'm trying to make a doc command abbreviation for python.
The original command is normal 0i"""^M"""
, which works in command-line mode.
But failed when using alias doc
defined by ca doc normal 0i"""^M"""
.
And later, I find I need to quit insert mode, do some movement, and then enter insert mode again.
The command normal 0i"""^[$a^M"""
failed both in command-line mode and with alias.
How should I deal with ^M
and ^[
in normal command alias,
and how should I manipulate insert mode quit and enter again action with normal command?
PS: The ^M
and ^[
character was made by combining CTRL-V
+ Enter
/Esc
.
command-line mode
, I've edited the content.