以二进制方式编辑这个文件:vim -b file
跳转到某行:vim +n file //n为行号
停留在行尾:vim + file
:e filename = 打开其他文档
:enew filename = 新建文档
:e# 或 ctrl+ˆ = 两个文档相互切换编辑
:f 或 ctrl+g = 显示当前正在编辑的文档名称
:f 文档名 = 改变编辑中的文档名
:!shell = 执行shell命令
:scriptnames = 查看所有加载的插件
:%!xxd = 文件转换成十六进制
:%!xxd -r = 转换回来
set cin = 打开 C/C++ 风格自动缩进
gg=G = 格式化全文
= 等号键用于调整缩进格式
u, ctrl-r = 撤销与重做
ctrl-r " = 粘贴VIM剪切板中的内容
ctrl-o = 在插入模式下暂时返回到通常模式
ctrl-p, ctrl-n = 自动完成
ctrl-r {register} = 在插入模式或者搜索输入时粘贴寄存器中的内容
:read foo.txt = Insert the file foo.txt below the cursor.
:0read foo.txt = Insert the file foo.txt before the first line.
:read !ls = Insert a directory listing below the cursor.
:$read !pwd = Insert the current working directory below the last line.