" 从上次编辑位置打开
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif
set number
" 自动缩进
set autoindent
" 禁用鼠标
set mouse-=a
" 语法高亮
syntax on
if has("autocmd")
autocmd BufRead *.txt set tw=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
\ exe "normal g'\"" |
\ endif
endif
set number
" 自动缩进
set autoindent
" 禁用鼠标
set mouse-=a
" 语法高亮
syntax on
本文介绍了一个具体的Vim配置脚本,通过设置实现从上次编辑的位置打开文件、自动缩进、禁用鼠标等功能,并且启用了语法高亮显示。

658

被折叠的 条评论
为什么被折叠?



