FreeBSD下使用vim+cscope

2009-05-13 05:10:21来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


                FreeBSD的ctags没有-R选项,迫使我尝试cscope,感觉比ctags强很多。
安装:
#cd /usr/ports/devel/cscope
#make install clean
#cd /usr/ports/editors/vim
#make WITH_GTK2=yes WITH_CSCOPE=yes install clean
配置:
.vimrc
" An example for a vimrc file.
"
" Maintainer:   Bram Moolenaar
" Last change:  2002 Sep 19
"
" To use it, copy it to
"     for Unix and OS/2:  ~/.vimrc
"             for Amiga:  s:.vimrc
"  for MS-DOS and Win32:  $VIM\_vimrc
"           for OpenVMS:  sys$login:.vimrc
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
  finish
endif
" Use Vim settings, rather then Vi settings (much
" This must be first, because it changes other options as a side effect.
set nocompatible
set autowrite
set nu
set cindent shiftwidth=4
set softtabstop=4
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
set autoindent
if has("vms")
  set nobackup          " do not keep a backup file, use versions instead
else
  set backup            " keep a backup file
endif
set history=50          " keep 50 lines of command line history
set ruler               " show the cursor position all the time
set showcmd             " display incomplete commands
set incsearch           " do incremental searching
" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
" let &guioptions = substitute(&guioptions, "t", "", "g")
" Don't use Ex mode, use Q for formatting
map Q gq
" This is an alternative that also works in block mode, but the deleted
" text is lost and it only works for putting the current register.
"vnoremap p "_dp
" 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
" Only do this part when compiled with support for autocommands.
if has("autocmd")
  " Enable file type detection.
  " Use the default filetype settings, so that mail gets 'tw' set to 72,

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Some Resources

下一篇:Installing Web Server in FreeBSD 6.0 with Apache 2