• vim:放弃hjkl


    vim放弃使用hjkl,可以加快文本的编辑速度,不信,看我摘录的文章:http://vimcasts.org/blog/2013/02/habit-breaking-habit-making/

    Wordwise motions are 5x faster than h and l

    The w, b, e, and ge commands allow us to move forward or backward to the start or end of a word. The W, B, E, and gE commands do the same for a WORD (see :help word for the difference between words and WORDs). If we say that the average word length is 5 letters, then moving back and forward a word at a time is approximately five times faster than using h and l to move a character at a time.

    Start off by adding w and b to your repertoire. These move forward and back to the start of a word. When you find yourself wanting to get to the end of a word, add e and ge to your repertoire.

    Character search is near-instant for moving within a line

    The f, F, t, T, ;, and , commands make up the suite of character search motions. When you press f{char}, Vim looks forward from the cursor position for the next occurrence of {char} on the current line. If it finds a match, the cursor moves directly there. If no match is found, nothing happens. (Vim might beep at you, but you can mute that by setting ‘visualbell’.)

    Try this: in Vim, move your cursor to the beginning of a line with lots of text on it. Look ahead for a character that occurs with low frequency, such as a punctuation mark or uppercase letter. Press f followed by the character that you picked. That’s two keystrokes. Are you there yet?

    If your cursor stopped on a match before the one you were aiming for, press ; to repeat the search. Keep pressing ; until you hit your mark. If you overshoot, press , to reverse the search.

    谷歌翻译加手动调整,没有全部翻译,把我认为的废话删了:)

    单词移动比h和l快5倍
    w,b,e和ge命令:允许我们向前或向后移动到单词的开头或结尾。 W,B,E和gE命令对WORD执行相同的操作(在vim中键入 :help word以获取word和WORD之间的区别)。如果我们说平均单词长度是5个字母,那么一次向前和向后移动一个单词大约比使用h和l一次移动一个单词快五倍。

    字符搜索几乎可以瞬时移动
    f,F,t,T ,;和命令组成了一系列字符搜索动作。当您按f {char}时,Vim会从当前行的下一个{char}出现的光标位置向前看。如果找到匹配,则光标直接移动到那里。如果没有找到匹配,则没有任何反应。 (Vim可能会发出哔哔声,但你可以通过设置'visualbell'来静音。)
    如果你的光标在你想要的字符前面,请按;重复搜索。继续按下;直到你达到你找的字符。如果按过了,请按,以向前搜索。

  • 相关阅读:
    redis搭建集群并用TreeSoft管理
    使用windows任务计划程序自动清除C盘缓存文件
    深入理解JavaScript事件循环机制
    redux源码解读(二)
    redux源码解读(一)
    create-react-app源码解读之为什么不搞个山寨版的create-react-app呢?
    深入理解CSS系列(二):为什么height:100%不生效?
    深入理解CSS系列(一):理解CSS的盒子模型
    搭建一个交互式的前端构建环境.md
    实习这件小事(一位大四狗的前端实习经历)
  • 原文地址:https://www.cnblogs.com/litifeng/p/10652768.html
Copyright © 2020-2023  润新知