:normal! i
vim不进入插入模式。同样的命令
:normal! A
将光标移动到行尾,但光标保持在插入模式。
任何想法为什么这不工作?没有,我想知道从vimscript函数的主体进入插入模式的另一种方式(当然函数返回之后,插入模式保持不变)。
编辑:看起来像:startinsert将填满问题的第二部分,但我仍然想知道我可以做些什么:正常! A或:正常!一个为什么那些不能像预期那样工作。用箭头运动模拟“追加”是一个坏的解决方案,因为像空行等等。
{commands} should be a complete command. If {commands} does not
finish a command,the last one will be aborted as if<Esc>
or<C-C>
was typed. The display isn’t updated while “:normal” is busy. This
implies that an insert command must be completed (to start Insert
mode,see :startinsert)
:startinsert可能是您要查找的命令。
:正常A可以通过追加一个爆炸(!)来启动插件,如Ingo Karkat所建议的。从帮助startinsert:
When the ! is included it works like “A”,append to the line.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。