1.进入vimrc
$ vim ~/.vimrc
2.拷贝以下代码置于文件末端(行号,自动换行,括号匹配,关键字高亮)
if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif
syntax on
set tabstop=4
set nu!
set shiftwidth=4
set autoindent
set cindent
set fdm=marker
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif

本文介绍如何通过编辑~/.vimrc文件来为Vim编辑器添加实用特性,包括设置行号显示、自动缩进、语法高亮等功能,特别针对xterm终端环境进行了配置优化。
982

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



