#cd ~
#touch .vimrc
#vi .vimrc
贴入以下代码即可:
1 set nocompatible
2 set backspace=indent,eol,start
3 set number
4 set smartindent
5 set showmatch
6 set history=50
7 set ruler
8 set incsearch
9 set tabstop=4
10 set shiftwidth=4
11 set softtabstop=4
12 set cindent
13 set nobackup
14 syntax on
15 set hlsearch
16 set showcmd
17 map Q gq
18 "set tags
19 set tags=tags
20 set tags+=./tags
21
22 if has("autocmd")
23 filetype plugin indent on
24 augroup vimrcEx
25 au!
26 autocmd FileType text setlocal textwidth=78
27 autocmd BufReadPost *
28 \if line("'\"") > 1 && line("'\"") <= line("$") |
29 \exe "normal! g'\"" |
30 \endif
31 augroup END
32 else
33 set autoindent
34 endif
35
36 if !exists(":Difforig")
37 command Difforig vert new | set bt=nofile | r # | 0d_ | diffthis
38 \ | wincmd p | diffthis
39 endif
40
41 if v:progname =~? "evim"
42 finish
43 endif
44
45
46
47 if has("cscope")
48 set csprg=/usr/bin/cscope
49 set csto=0
50 set cst
51 set nocsverb
52 " add any database in current directory
53 if filereadable("cscope.out")
54 cs add cscope.out
55 " else add database pointed to by environment
56 elseif $CSCOPE_DB != ""
57 cs add $CSCOPE_DB
58 endif
59 set csverb
60 set cscopetag
61 set cscopequickfix=s-,g-,c-,d-,t-,e-,f-,i-
62 endif
阅读(1089) | 评论(0) | 转发(0) |