欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

vim does not map customized key?

发布时间:2025/3/20 编程问答 33 豆豆
生活随笔 收集整理的这篇文章主要介绍了 vim does not map customized key? 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

it is a long time confusing me that why my customized key map in vim does not work? Some vim configuration contents in "/etc/vimrc" are as the following:

"在insert mode下也可以 快速移动到行尾和行首" imap <c-l> <esc>A inoremap jj <esc>ji inoremap kk <esc>ki inoremap hh <esc>ha

After experiencing many times, i suddenly/brusquely recognize that this issue may be caused by the compatibility between vi and vim. In vi mode, everything such as "<", ">", has no special meanings. Therefore, a map like "imap c-l e scA", "e sc" will be interpreted to their original and literal charater expression. That is to say, "e sc" will be displayed "e sc" and not be translated into a "normal mode" command.

And, vim program starts in vi compatible mode by default.

So, make sure to set "no compatible" command and keep it before any key map commands.

转载于:https://www.cnblogs.com/bkylee/p/5863482.html

总结

以上是生活随笔为你收集整理的vim does not map customized key?的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。