在Vim变得更好


Becoming better at Vim

我已经使用VIM很长时间了,但是我大部分时间都在使用插入模式,而且我仍然使用箭头键移动!!).

我觉得自己无法充分利用自己可爱的编辑器,尤其是在导航(尤其是代码)、复制和粘贴以及对现有代码进行其他操作方面。(尽管我对复杂的搜索/替换模式相当满意)。

  • 我该如何进一步学习?
  • 人们会推荐什么资源?


(P)"Why,oh,why,do Those 35?"@!Nutheads Use VI?"is a nice introduction to"the vim way",especially about text objects which are one of the most defining features of vim.(p)


(P)这是一些AWESOME Screencasts that should give you an idea of what to learn next.There are also videos for intermediate and advanced topics,but the novice ones are in fact the most important.(p)(P)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 some where,and make you think more vim-like.Fintality,I enabled arrow keys again in in insert mode,but I hardly every use them.There is,most often,better ways to get around.(p)字母名称(P)and especially(p)字母名称


  • Type EDOCX1 On the Command Line 0
  • 跳到vim,type:help or EDOCX1
  • Subscribe to Mailing List
  • Official Vim docs

  • 另外两个提示:

    • 使用VIM编辑所有内容(电子邮件、Web表单、代码…)。当一些事情感觉缓慢时,可能有一种更快的方法。你的朋友是你的。

    • 前往http://vimgolf.com/参加比赛。我学到了很多技巧。[免责声明:在VimGolf比赛期间,长时间"失踪"不承担任何责任]。


    (P)1 An interesting article by Bram Moolenaar Himself:Seven Habits of Effective Text Editing.(p)


    这就是我如何学习Vim(以及其他一些东西)。这很容易。

    浏览帮助文档并找到一个命令来执行您一直在执行的操作。例如,删除整个单词。记住这一点。

    现在,下一次当你发现自己点击"xxxxx"删除一个单词时,停下来,把它放回去并使用新的命令。如果有必要的话,可以查一下。所以你不用点击"XXXXXX",而是返回并点击"DW"。

    一次又一次地这样做,一开始会很慢,但最终会坚持下去。

    一旦你有了向下的命令,从顶部开始。为您一直执行的操作查找另一个命令…

    你会惊讶于你能如此快速地获取新的命令和技术。


    按照建议重新映射/禁用箭头键是强迫自己不要使用它们的一个很好的方法。

    另一个需要考虑的问题是:如果按键盘上的Esc键有点不舒服,您可能希望在操作系统中将Caps Lock重新映射为Esc。对我来说,这是一个非常有用的步骤,因为Esc在我的知识库上是一个很难触及的地方,这也是另一个障碍,使我一直处于插入模式(因为很难退出)。在Caps Lock上安装Esc使其很小的范围,在插入模式和插入模式之间的跳跃非常快。

    对于学习VIM中的高级知识,最好的资源是:帮助,但是对于基础知识的学习,你只需要做;它是肌肉记忆,比任何事情都重要。你说你知道搜索。有意识地将其用作导航工具。搜索[/,?]基于内联字符的搜索[F,F,T,T]是一些关键的VIM导航工具。只需使用它们;使用禁用的光标键,您将很快在肌肉记忆中独自导航。

    文本对象。很容易成为编辑器的最佳功能之一。这是另一件立即有意识地练习的事情。像"yiw"、"dit"等东西是如此的强大和快速;单独学习和使用它们会让你感觉像一个vim用户。

    一旦你下载了文本对象和基本的导航功能,那么现在是时候继续阅读和学习:定期帮助和搜索网页寻找优秀的插件了。说真的,你可以用VIM很多年,并有一个"啊哈!"瞬间不经意间绊倒在了某个鲜为人知的小道消息上:帮助你。


    (P)See this thread:what is your most productive shortcut with vim?(p)(P)特别是第一个答案(p)


    (P)Read Hacking Vim:A Cookbook to get the most out of the latest vim editor.(p)


    我制作这个游戏是为了帮助我侄子学习,但它只在火狐和Chrome>上运行。<http://kikuchiyo.org

    现在,它只处理移动和进入插入模式。beta版本允许你用光剑攻击敌人,左边是"i",右边是"a":p

    继续努力学习维姆,这是值得努力的!

    :)


    布尔奇1(P)Read Vim Manual Completely(Type EDOCX1 Americano 2;You can browse from there).This is how you get to know all of the movements and commands.这是最有用的,如果你知道的基础和想改进。(p)布尔奇1(P)Vim.org,look through the most popular vim scripts.检查他们的来源,如果你发现了一些利益。Or just install them and enjoy.That site comprises a lot of links to scripts that help browning source code in different languages;and it is relatively easy to find them there.(p)(P)Stackoverflow.com also might be of help.(p)


    布尔奇1(P)I don't see a problem with this.(p)(P)Frankly,What's the probability that you'll have to use vim and a keyboard that lacks arrow keys?(p)(P)You know,most people use vim because it does the job(oh well,because they mastered it to a level when it does the job for them),not for being eligists(like not using the arrow keys).(p)(P)A couple of advices for improving your vim knowledge:(p)

    • Periodically open the vim help at a random place and read about a random distinct feature.这将是你一分钟。你可能不会在下一个十年中利用这一点。但是,如果你是幸运的,你会在一个局势中,当你看到你可以利用你的知识来实现某些任务。You'll open the help again to consensh your memory.在实践中使用了时代的一个特征之后,这将是一个里程碑。在这一点上,你的VIM知识将得到改进。
    • Use:Helpgrep to dig into random places of documentation.如果你需要做一些事情,而你发现了在文件中解释这些事情的地方,那就不要停止。阅读博士Snippet一个更多的时间。好了好了For each keyword,use:Helpgrep keyword to discover the logical links with other parts of the Vim Documentation.


    (P)Learning the VI and Vim Editors.(p)


    (P)I take a look at this list of best of vim tips every now and then and I still pick up new tricks on a regular basis.(p)


    我停止使用箭头键的方式并不是禁用它们(我仍然在插入模式下使用它们),但是如果你想正确使用你的小指(即l键),左食指,h键,&ring finger up(振铃),k键,&;pick down(选取)j键。

    所以你手上的四个数字中的第一个(忘记拇指)是最左边的,而小指是最右边的。用"振铃"这个词,就像用你的无名指打电话一样,中指除了下指以外,别无它法。

    这也有助于我忘记钥匙的名称(H,J,K,L)。没有一个好的记忆法可以像我发现的那样记住它们,也没有太多使用这些键的映射。


    101个让你在Vim编辑器中快速高效的黑客……保证或本系列:ViVim提示和技巧


    我认为视频对学习很有帮助。

  • 德里克·怀亚特在维梅奥
  • 幻影

  • http://www.vi-improved.org/tutorial.php<--您应该阅读并流畅地进行此聊天,这对初学者非常有用。快乐的维默


    (P)一读这个(p)(P)2-If you use a RSS reader subscribe to these pages(p)(P)Original:ENGLISH(p)(P)联合国(p)