A Byte Of Vim cn:打字技巧
出自Geckos wiki
目录 |
简介
We just learned about how to switch between the three basic modes in Vim. Isn't it hard to remember all those keys? How do you remember which key is for which operation? Well, that's the "key" question. The answer is that you shouldn't "remember", your fingers should automatically know what to do!. It must (literally) be on your finger tips.
我们之前学习了如何在Vim的三个基本模式之间进行切换。是不是难以记住所有的快捷键?你如何记住每个操作对应的快捷键?恩,这是个"关键"问题。答案是你不应该去"背",你的手指应该自然地知道该怎么做!。 It must (literally) be on your finger tips.
So how do we do that? By making it a habit. Walking is not a nature that humans have at birth, but after trying a bit and by habit, we learn to walk. Same with Vim, although it requires less effort.
那如何做到呢?要养成习惯。走路不是人类生来就会的,但是通过后天的尝试与习惯,我们学会了走路。学习Vim也是一样的,尽管如此,一些努力也是必要的。
Vim was designed for people who are familiar with the keyboard. Why? Because we spend most of our time in editing tasks, which implicitly make extensive use of the keyboard, and the faster we are able to type, the faster we get the work done.
Vim 是为大量使用键盘的人设计的。为啥?因为我们大部分时间都花在了编辑的任务上,所以会导致我们大量的使用键盘,输入的越快,就能呢个越快的完成工作。
Let's start with a basic technique to get you comfortable with the keyboard.
我们先从一个基本的技术开始让你舒适的使用键盘。
起始行技术
Place your fingers on the home row of the keyboard by positioning your hands such that the fingers of your left hand are on the ASDF keys and the fingers of your right hand are on the JKL; keys as shown in the drawing (artist unknown).
把你的手指放在键盘的起始行 上面,就是你的左手手指分别放在 ASDF 键上,右手手指分别放在 JKL; 键上,就如图中所示。
Getting your hands to be comfortable in this position is one of the most important steps in learning how to use the keyboard effectively. The idea is that you should be able to type any key using the finger that is closest to that key and then your finger should automatically come back to its original position. It might seem difficult at first but try it a couple of times and you will see that you will type much faster this way.
高效使用键盘最重要的一步就是使你的手舒适地放在这个位置上。这个想法的目的是让你的手指能按下任意临近的按键并自动回到原来的位置上。这样做一开始可能看上去很麻烦,但是当你尝试了一段时间后你就会发觉使用这个方法后打字的速度变快了。
Note that most keyboards have some home row markers on the F and J keys which serves as a reminder for you on where your fingers should be placed.
注意大部分键盘在 F 和 J 按键上都有行标记,这可以帮助你记住手指应该所在的位置。
Now, try typing the alphabets A-Z using the home row technique.
现在,试着用起始行技术输入字母 A-Z。
Relatedly, there is also a free online typing tutorial available that explains the basics of typing skills. I would encourage you to try it for just ten minutes and explore.
同样,也有一个 免费的在线打字教程 讲述基本的打字技巧。我鼓励你花10分钟去尝试一下。
Vim 键盘小抄图
If you want to know how each key can map to something useful in Vim, see this Vim graphical cheat sheet by 'jng'.
如果你想知道Vim中每一个键对应的作用,请看这个 Vim graphical cheat sheet by 'jng'。
Although a lot of commands are listed, for now you only need to learn the basic 'hjkl' keys which translates to left, down, up, right keys respectively. You'll learn more about this in the next chapter.
虽然列出了很多命令,目前你只需要学会基本的 'hjkl' 键,分别翻译为 左, 下, 上, 右。在下一章你将会学到更多关于这几个键的作用。
小结
Notice that our efficiency in using Vim is directly proportional to the efficiency of using the keyboard.
注意,我们在使用Vim时的效率是直接与键盘的使用效率成正比的。
A Byte Of Vim 中文版,由geckos团队翻译。 本章原文地址: http://www.swaroopch.com/notes/Vim_en:Typing_Skills