之前当配置vim的时候,都是在网上找的vim配置文件,昨天给同学装了一个linux系统,想给他配置vim,自已在网上找了不小一会才找到一个比较简单但基本够用的配置文件,为此,我把这个文件记录下来,方便我以后遇到这种情况的处理。
执行下面的命令:
- ^_^[sunny@sunny-laptop ~]27$ cd ~
- ^_^[sunny@sunny-laptop ~]28$ gedit .vimrc
然后 ctrl+c 下面的内容,之后 ctrl+v将其复制到.vimrc文件,并且 ctrl+s。最后,关闭即可。
- syntax on
- set nocompatible
- set number
- filetype on
- set history=1000
- set background=dark
- set autoindent
- set smartindent
- set tabstop=4
- set shiftwidth=4
- set showmatch
- set guioptions-=T
- set ruler
- set ruler
- set nohls
- set incsearch
- if &term=="xterm"
- set t_Co=8
- set t_Sb=^[[4%dm
- set t_Sf=^[[3%dm
- set tags=tags;
- set autochdir
- endif