Chinaunix首页 | 论坛 | 博客
  • 博客访问: 140067
  • 博文数量: 45
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 466
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-05 16:22
个人简介

热爱开源

文章分类
文章存档

2024年(1)

2022年(1)

2017年(2)

2015年(2)

2013年(4)

2008年(35)

我的朋友

分类: LINUX

2008-03-09 01:29:14


set ruler
set number
syntax enable
set expandtab
set tabstop=4
set cindent shiftwidth=4
set hlsearch
set foldcolumn=4
set foldmethod=indent
set guifont=SimSun\ 10

" multi-encoding setting
if has("
multi_byte")
    "
set bomb
    set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
    " CJK environment detection and corresponding setting
    if v:lang =~ "
^zh_CN"
        "
Use cp936 to support GBK, euc-cn == gb2312
        set encoding=cp936
        set termencoding=cp936
        set fileencoding=cp936
    elseif v:lang =~ "^zh_TW"
        " cp950, big5 or euc-tw
        "
Are they equal to each other?
        set encoding=big5
        set termencoding=big5
        set fileencoding=big5
    elseif v:lang =~ "^ko"
        " Copied from someone's dotfile, untested
        set encoding=euc-kr
        set termencoding=euc-kr
        set fileencoding=euc-kr
    elseif v:lang =~ "
^ja_JP"
        "
Copied from someone's dotfile, untested
        set encoding=euc-jp
        set termencoding=euc-jp
        set fileencoding=euc-jp
    endif
    " Detect UTF-8 locale, and replace CJK setting if needed
    if v:lang =~ "
utf8$" || v:lang =~ "UTF-8$"
        set encoding=utf-8
        set termencoding=utf-8
        set fileencoding=utf-8
    endif
else
    echoerr "
Sorry, this version of (g)vim was not compiled with multi_byte"
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,
    " 'cindent' is on in C files, etc.
    "
Also load indent files, to automatically do language-dependent indenting.
    filetype plugin indent on

    " Put these in an autocmd group, so that we can delete them easily.
    augroup vimrcEx
        au!

        "
For all text files set 'textwidth' to 78 characters.
        autocmd FileType text setlocal textwidth=78

        " When editing a file, always jump to the last known cursor position.
        "
Don't do it when the position is invalid or when inside an event handler
        " (happens when dropping a file on gvim).
        autocmd BufReadPost *
                    \ if line("
'\"") > 0 && line("'\"") <= line("$") |
                    \ exe "
normal g`\"" |
                    \ endif

    augroup END

else

    set autoindent " always set autoindenting on

endif "
has("autocmd")

if has("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
    set cscopetag
    set cscopequickfix=s+,g+,c+,d+,t+,e+,f+,i+
endif

noremap :make
noremap :make clean;make
noremap :Tlist
noremap :TlistSync
noremap :!./vitags.sh:cs reset
noremap :!cvs up

阅读(314) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~