vim重新映射hjkl [英] vim remapping the hjkl

查看:235
本文介绍了vim重新映射hjkl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将字母hjkl映射到我的.vimrc文件中的jkl 这样我就可以在vim书写时以手指在键盘上的感觉一直像在键盘上一样.

I am trying to map the letter hjkl to jkl in my .vimrc file so that I can have my fingers the way they always are on the keyboard, while writing in vim.

问题是当我将k映射到l时,它跳到了l到;之间. 因此k与;相同. 当然,所有这些人都会遇到同样的问题.

The problem is that as I map k to l, it jumps into the l to ;. so k becomes the same as ;. The same off course happens to all of them.

所以所有键都变成一个,因为它们是互相复制的.

So all the keys become one because they copy through one another.

如何防止这种情况?

推荐答案

使用noremap:

noremap ; l
noremap l k
noremap k j
noremap j h

这篇关于vim重新映射hjkl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆