vim 配置文件

Vim 配置文件目录:   /etc

本人操作系统 Centos 6.2 以下vim配置文件亲们可以直接复制使用 !

  vim  /etc/vimrc 

  1 if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
  2    set fileencodings=ucs-bom,utf-8,latin1
  3 endif
  4 
  5 set nocompatible        " Use Vim defaults (much better!)
  6 set bs=indent,eol,start         " allow backspacing over everything in insert mode
  7 "set ai                 " always set autoindenting on
  8 "set backup             " keep a backup file
  9 set viminfo='20,\"50    " read/write a .viminfo file, don't store more
 10 alias bond0 bonding
 11 options bond0 miimon=100 mode=5
 12                         " than 50 lines of registers
 13 set history=100         " keep 50 lines of command line history
 14 set ruler               " show the cursor position all the time
 15 
 16 " Only do this part when compiled with support for autocommands
 17 if has("autocmd")
 18   augroup redhat
 19   autocmd!
 20   " In text files, always limit the width of text to 78 characters
 21   autocmd BufRead *.txt set tw=78
 22   " When editing a file, always jump to the last cursor position
 23   autocmd BufReadPost *
 24   \ if line("'\"") > 0 && line ("'\"") <= line("$") |
 25   \   exe "normal! g'\"" |
 26   \ endif 
 27   " don't write swapfile on most commonly used directories for NFS mounts or USB sticks
 28   autocmd BufNewFile,BufReadPre /media/*,/mnt/* set directory=~/tmp,/var/tmp,/tmp
 29   " start with spec file template
 30   autocmd BufNewFile *.spec 0r /usr/share/vim/vimfiles/template.spec
 31   augroup END
 32 endif
 33    
 34 if has("cscope") && filereadable("/usr/bin/cscope")
 35    set csprg=/usr/bin/cscope
 36    set csto=0
 37    set cst
 38    set nocsverb
 39    " add any database in current directory
 40    if filereadable("cscope.out")
 41       cs add cscope.out
 42    " else add database pointed to by environment
 43    elseif $CSCOPE_DB != ""
 44       cs add $CSCOPE_DB
 45    endif
 46    set csverb
 47 endif
 48 
 49 " Switch syntax highlighting on, when the terminal has colors
 50 " Also switch on highlighting the last used search pattern.
 51 if &t_Co > 2 || has("gui_running")
 52   syntax on
 53   set hlsearch
 54 endif
 55 
 56 filetype plugin on
 57 
 58 if &term=="xterm"
 59      set t_Co=8
 60      set t_Sb=^[[4%dm
 61      set t_Sf=^[[3%dm
 62 endif
 63 
 64 " Don't wake up system with blinking cursor:
 65 " http://www.linuxpowertop.org/known.php
  let &guicursor = &guicursor . ",a:blinkon0"
  set nu
  set autoindent
  set ai!
  set smartindent
  set shiftwidth=4
  set cindent shiftwidth=4
  set incsearch
  set hlsearch

  set autochdir

  set laststatus=2
  set cmdheight=1
  
  filetype indent on
  filetype plugin on
  filetype plugin indent on
  
  let g:snips_author='Ruchee'
  set mouse=a
  set statusline=\ %<%F[%1*%M%*%n%R%H]%=\ %y\ %0(%{&fileformat}\ %{&encoding}\ %c:%l/%L%)\
 

   

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值