我在Linux中的.vimrc配置 (附taglist+ctags使用)

vim+taglist+ctags使用说明:
http://bbs.chinaunix.net/viewthread.php?tid=699109&extra=page%3D2

不过其中有以下语句,改成:
  let Tlist_Ctags_Cmd = "/usr/local/bin/exctags"
  =>let Tlist_Ctags_Cmd = "/usr/local/bin/ctags"


以下附上我在Linux中的.vimrc配置:
"if v:lang =~ "utf8$" || v:lang =~ "utf-8$"
"   set fileencodings=utf-8,latin1
"endif
set encoding=utf-8
"set fileencodings=ucs-bom,utf-8,chinese
"set fileencoding=gb188030
set fileencoding=utf-8
set langmenu=C
set fileencodings=utf-8,gb18030,utf-16,big5
language messages C

let &termencoding=&encoding
"set fileencodings=utf-8,gbk,ucs-bom,cp936

set nocompatible    " Use Vim defaults (much better!)
set bs=indent,eol,start        " allow backspacing over everything in insert mode
"set ai            " always set autoindenting on
"set backup        " keep a backup file
set viminfo='20,\"50    " read/write a .viminfo file, don't store more
            " than 50 lines of registers
set history=50        " keep 50 lines of command line history
set ruler        " show the cursor position all the time
set cindent
set ts=4
set shiftwidth=4
syntax on
syntax enable

set cscopequickfix=s-,c-,d-,i-,t-,e-
"set encoding=utf-8

"-------Code ZheDie-----------------
"set foldcolumn=4
"set foldmethod=indent
"set foldmethod = syntax
"set foldlevel=100

let    Tlist_Show_One_File=1
let Tlist_Exit_OnlyWindow=1
set cscopequickfix=s-,c-,d-,i-,t-,e-

" Only do this part when compiled with support for autocommands
if has("autocmd")
  " In text files, always limit the width of text to 78 characters
  autocmd BufRead *.txt set tw=78
  " When editing a file, always jump to the last cursor position
  autocmd BufReadPost *
  \ if line("'\"") > 0 && line ("'\"") <= line("$") |
  \   exe "normal! g'\"" |
  \ endif
endif

if has("cscope") && filereadable("/usr/bin/cscope")
   set csprg=/usr/bin/cscope
   set csto=0
   set cst
   set nocsverb
   " add any database in current directory
   if filereadable("cscope.out")
      cs add cscope.out
   " else add database pointed to by environment
   elseif $CSCOPE_DB != ""
      cs add $CSCOPE_DB
   endif
   set csverb
endif

" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
  syntax on
  set hlsearch
endif

if &term=="xterm"
     set t_Co=8
     set t_Sb=[4%dm
     set t_Sf=[3%dm
endif

""""""""""""""""""""""""""""""
" Tag list (ctags)
""""""""""""""""""""""""""""""
"if MySys() == "windows"                "设定windows系统中ctags程序的位置
 "  let Tlist_Ctags_Cmd = 'ctags'
"elseif MySys() == "linux"              "设定linux系统中ctags程序的位置
let Tlist_Ctags_Cmd = '/usr/bin/ctags'
"endif
let Tlist_Show_One_File = 1       "不同时显示多个文件的tag,只显示当前文件的
let Tlist_Exit_OnlyWindow = 1      "如果taglist窗口是最后一个窗口,则退出vim
let Tlist_Use_Right_Window = 1         "在右侧窗口中显示taglist窗口

posted @ 2008-05-08 00:38  shipfi  阅读(5591)  评论(0编辑  收藏  举报