在vim中,为什么用'j'表示向下,用'k'表示向上? [英] In vim, why is 'j' used for down and 'k' for up?

查看:332
本文介绍了在vim中,为什么用'j'表示向下,用'k'表示向上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用vim很多年了,从来没有真正考虑过它.我的一个朋友问为什么,要注意的是,在我们的文化中,左通常映射为上,而右通常映射为下,从而使vim键向后移动.我知道它们位于主行上,这意味着您不必将手指移到任何地方都可以敲击它们,但这完全是另一回事.基本上,我的问题是:有人知道为什么赋予了这些键其当前的用途吗?如果您还可以向我指出有关该决定的一些文档,那就太好了.

I've been using vim for many years and have never really thought about it. A friend of mine asked why that is, noting that in our culture, left would usually map to up while right would map to down, making the vim keys backwards. I understand that they are on the home row, meaning that you do not have to move your fingers anywhere to hit them, but that's a different point altogether. Basically, my question is: does anyone know why these keys were given their present purposes? It would be great if you could point me to some documentation on the decision as well.

推荐答案

答案在 vi的维基百科条目中. Bill joy编写了ex的可视模式-最终成为vi的前身vi-使用了Lear Siegler ADM3A终端,在该终端上,H,J,K,L键映射到左,下,上,右–从那以后.

The answer is in the wikipedia entry for vi. Bill joy, who wrote the visual mode of ex - which ended up being vim precursor vi - used a Lear Siegler ADM3A terminal on which the H, J, K, L keys mapped to left, down, up, right - and its been that way ever since.

这是键盘布局:

关于ADM3A布局的其他几点注意事项:

A couple of other points of note on the ADM3A layout:

  • Q的左键:退出键-比今天的键盘更方便使用,因此是在正常模式和插入模式之间进行切换的不错选择.
  • 右上角:"Home"键是波浪号(〜)的两倍,它随后成为Unix用户主目录的简写.

这篇关于在vim中,为什么用'j'表示向下,用'k'表示向上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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