Vim
Keeping Coding Syntax
- Save a file with a particular extension(特定的扩展名) and syntax highlight is on
- Hello.java
- ok.html
- …
- % - Jump between matching bracket(keyboard: shift + 5)
- bracket like {}, [], ()…
- 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
- = - Properly Indent based on specified language
- == – Properly indent the current line
- =G – Properly indent whole document when combined with gg command
- ~ - Change case of character