- 自动语法高亮
syntax on
- 显示行号
set number
- 缩进设置
3.1. 设置自动缩进
3.2. 设置 tab 宽度为4个空格set cindent
3.3. 为新行自动添加与当前行相同的缩进set tabstop=4
set autoindent
- 记住上次打开位置
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
常用 Vim 配置
最新推荐文章于 2024-09-03 09:10:31 发布