1. set 命令
打开某个命令
:set option
关闭某个命令
:set nooption
忽略大小写
:set ic (ignore char)
不忽略大小写
:set noic
查看正在使用的选项
:set all
2.执行 unix 命令
!command
!date 显示日期
!sh 执行 shell
Ctrl + D 退出
:r !date
把日期读到文本中
:r !sort filename 将文本排序后读入
单词缩写
:ab hehe oooooooooo 将oooooooooo 缩写为hehe 插入模式时,输入hehe自动替换为 oooooooooo
:unab hehe 取消别名
:ab 列出所有别名
与ab 相同,不同的是 map 在命令模式时生效
:map x sequence
:unmap
:map
安装 spell 程序
sudo apt-get install spell
找出文件中单词拼写错误:
spell finename
缩排控制
:set autoindent
tab 默认8个空格,下面命令可以改变
:set shiftwidth=4
现实 tab
:set list