Skip to content

Instantly share code, notes, and snippets.

@laixintao
Last active December 1, 2016 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laixintao/281a0ea230cd6a4a32560d2e341e6809 to your computer and use it in GitHub Desktop.
Save laixintao/281a0ea230cd6a4a32560d2e341e6809 to your computer and use it in GitHub Desktop.
Vim Command.
"为不同的文件类型设置不同的空格数替换TAB
autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set ai
autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set sw=4
autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set ts=4
autocmd FileType php,python,c,java,perl,shell,bash,vim,ruby,cpp set sts=4
autocmd FileType javascript,html,css,xml set ai
autocmd FileType javascript,html,css,xml set sw=2
autocmd FileType javascript,html,css,xml set ts=2
autocmd FileType javascript,html,css,xml set sts=2
命令小结
m ——创建标记
' ——移动到标记的文本行首
` ——移动到标记的光标位置
:marks ——列示所有标记
:delmarks ——删除指定标记
:delmarks! ——删除所有标记
固定的标记
-------------------------------
. ——最近编辑的位置
0-9 ——最近使用的文件
∧ ——最近插入的位置
' ——上一次跳转前的位置
" ——上一次退出文件时的位置
[ ——上一次修改的开始处
] ——上一次修改的结尾处
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment