你知道,大多数人使用 vim 是因为它可以完成工作(哦,好吧,因为当它为他们完成工作时,他们已经掌握了它的水平) ,而不是因为他们是精英(比如不使用箭头键)。
一些提高你 Vim 知识的建议:
周期性地在一个随机的地方打开 vim 帮助,并阅读一个随机的独特的特征。只需要几分钟。在未来 X 年内,您可能不会使用这个特性。但是如果你幸运的话,你会遇到这样的情况,你会发现你可以运用你的知识来完成一个特定的任务。你会再次打开帮助来刷新你的记忆。在实践中使用这个特性几次之后,它就会坚持下去。在这一点上,你的 Vim 知识将得到提高。
Help grep 可以挖掘文档的随机位置。如果你需要做些什么,并且在文件中找到了解释的地方,不要止步于此。再读一遍文档片段。找到关键词。对于每个关键字,使用: help grep 关键字发现与 vim 文档其他部分的逻辑链接。
Also, when I felt that I was stagnating and not really learning "the Vim way", I chose to disable arrow keys in both normal and insert mode. This forces you to use ESC to get somewhere, and makes you think more Vim-like. Ultimately, I enabled arrow keys again in insert mode, but I hardly ever use them. There is, most often, better ways to get around.
For learning advanced stuff in Vim the best resource is the :help, but for getting the basics down you just need to do it; it's muscle memory more than anything. You say you know search. Consciously use it as a navigation tool. The searches [/, ?] and the inline char based searches [f, F, t, T] are some of the key Vim nav tools. Just use them; comboed with the disabled cursor keys you'll be navigating on muscle memory alone in no time.
文本对象。这是编辑器最好的特性之一。这是另一件需要立即有意识地去实践的事情。像‘ yiw’,‘ dit’等等这样的东西是如此的强大和快速; 单独学习和使用它们会让你感觉像一个 Vim 用户。
一旦你已经有了文本对象和基本的导航,那么是时候继续阅读和学习: 帮助定期和搜索网络的优秀插件。说真的,你可以用 Vim 很多年,然后发出“啊哈!”偶然发现了一些你从不知道的小道消息。