Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
来自 Emacs,我真的很想念一个快速到达终点的方法。 我知道Ctrl+但老实说更喜欢在插入模式下O使用单个命令到达行尾。
有没有办法在插入模式Ctrl下将+映射e到Normal 模式+ ?A
在映射中不保留插入模式的替代解决方案:
:inoremap <C-E> <End> :inoremap <C-A> <Home>
CTRL-E不过,通过重新映射和来检查你失去了什么CTRL-A!
CTRL-E
CTRL-A
这应该可以解决问题:
:imap <silent> <C-e> <ESC>A
imap代表插入模式,<C-e>是Ctrl+ e,Esc+a是要执行的动作。
imap
<C-e>
您可以将其添加到您的vimrc,而无需:.
vimrc
: