1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
| 1 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$" 2 set fileencodings=ucs-bom,utf-8,latin1 3 endif 4 5 colorscheme desert 6 set cursorline 7 highlight CursorLine ctermbg=darkred ctermfg=white cterm=bold term=bold guibg=grey40 8 9 " set cursorcolumn " 竖划线 10 11 12 " set mouse=a " 鼠标可用 13 set nu 14 set showmode 15 set autoindent 16 set cindent 17 set smartindent 18 set tabstop=4 19 set shiftwidth=4 20 set ai! 21 set showmatch 22 23 24 25 set nocompatible 26 set bs=indent,eol,start 27 "set ai " always set autoindenting on 28 "set backup " keep a backup file 29 set viminfo='20,\"50 " read/write a .viminfo file, don't store more 30 31 set history=50 32 set ruler 33 34 35 if has("autocmd") 36 augroup redhat 37 autocmd! 38 39 40 41 autocmd BufReadPost * 42 \ if line("'\"") > 0 && line ("'\"") <= line("$") | 43 \ exe "normal! g'\"" | 44 \ endif 45 46 autocmd BufNewFile,BufReadPre /media/*,/run/media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp 47 48 autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec 49 augroup END 50 endif 51 52 if has("cscope") && filereadable("/usr/bin/cscope") 53 set csprg=/usr/bin/cscope 54 set csto=0 55 set cst 56 set nocsverb 57 58 if filereadable("cscope.out") 59 cs add $PWD/cscope.out 60 61 elseif $CSCOPE_DB != "" 62 cs add $CSCOPE_DB 63 endif 64 set csverb 65 endif 66 67 68 69 if &t_Co > 2 || has("gui_running") 70 syntax on 71 set hlsearch 72 endif 73 74 75 76 if &term=="xterm" 77 set t_Co=8 78 set t_Sb=^[[4%dm 79 set t_Sf=^[[3%dm 80 endif 81 82 83 84 let &guicursor = &guicursor . ",a:blinkon0"
|