听峰's Blog -> 最爱的 vimrc 设置
来源:百度文库 编辑:神马文学网 时间:2024/04/26 13:38:29
最爱的 vimrc 设置
| 分类: GUN Email it | 打印 2005-10-6, 14:45 PM 代码set rulerset 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
noremap
noremap
noremap
noremap
noremap
听峰's Blog -> 最爱的 vimrc 设置
PHP中设置Session过期的方法 ? gry's blog
听峰‘s Blog -> vim ctags taglist cscope cppcomplete global
[转]我的vimrc设置_猪猫的博客
听小说我的最爱
IIS设置问题解决HTTP出错-Biecry's Blog
Windows XP 自动登陆设置 - Netboy‘s Blog
Windows XP 自动登陆设置 - Netboy‘s Blog
Windows XP 自动登陆设置 - Netboy‘s Blog
女人一生最爱听的三句话
孩子最爱听的五句话
男人最爱听的16句话
15句女生最爱听的情话
孩子最爱听的五句话
女人最爱听的15句谎话
女人一生最爱听的三句话
聊天时我最爱听的歌曲
孩子最爱听的五句话
的米-漠石‘s Blog
vimrc配置 ~/.vimrc
路由器的设置方法(图解)s
Serv-U安全设置攻略 - Wyulnnhtg‘s Blog - 51CTO技术博客-领...
WindowsXP终极优化设置(精心整理篇)1 - nofish 's BLOG - 张...
WindowsXP终极优化设置(精心整理篇)2 - nofish 's BLOG - 张...