Vim - skill

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Irlyue/article/details/52067636

Vim


Keeping Coding Syntax

  1. Save a file with a particular extension(特定的扩展名) and syntax highlight is on
    • Hello.java
    • ok.html
  2. % - Jump between matching bracket(keyboard: shift + 5)
    • bracket like {}, [], ()…
  3. Indent and De-indent
    • > – Indent(keyboard: shift + .)
    • < – De-indent(keyboard: shift + ,)
      缩进(或解缩进)过程其实有两步:首先,键入’>’(即shift + .),这时光标会变为modifier cursor(额,是翻译为调整光标吗),然后等待用户指明缩进形式;然后,一般情况下都是再次键入’>’,缩进一个Tab单位。
      An example to indent the whole file(type in the following command in order)
      gg - jump to the top of document
      > - shift + .
      G - indent until the end of document
  4. = - Properly Indent based on specified language
    • == – Properly indent the current line
    • =G – Properly indent whole document when combined with gg command
  5. ~ - Change case of character

猜你喜欢

转载自blog.csdn.net/Irlyue/article/details/52067636
Vim