.vimrc(久末)
2007年03月09日(金)10:05|久末
文字コード認識はどこからかいただいたもの。
set ignorecase set number nnoremap:TlistToggle set nobk set backspace=2 set tabstop=2 set shiftwidth=2 set autoindent set expandtab set laststatus=2 set statusline=%< %f %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P set showmatch noremap! ^? ^H if &encoding !=# 'utf-8' set encoding=japan endif set fileencoding=japan if has('iconv') let s:enc_euc = 'euc-jp' let s:enc_jis = 'iso-2022-jp' " iconvがJISX0213に対応しているかをチェック if iconv("x87x64x87x6a", 'cp932', 'euc-jisx0213') ==# "xadxc5xadxcb" let s:enc_euc = 'euc-jisx0213' let s:enc_jis = 'iso-2022-jp-3' endif " fileencodingsを構築 if &encoding ==# 'utf-8' let s:fileencodings_default = &fileencodings let &fileencodings = s:enc_jis .','. s:enc_euc .',cp932' let &fileencodings = &fileencodings .','. s:fileencodings_default unlet s:fileencodings_default else let &fileencodings = &fileencodings .','. s:enc_jis set fileencodings+=utf-8,ucs-2le,ucs-2 if &encoding =~# '^euc-%(jp|jisx0213)$' set fileencodings+=cp932 set fileencodings-=euc-jp set fileencodings-=euc-jisx0213 let &encoding = s:enc_euc else let &fileencodings = &fileencodings .','. s:enc_euc endif endif unlet s:enc_euc unlet s:enc_jis endif "rails.vim let g:rails_level=4 let g:rails_default_file="app/controllers/application.rb" let g:rails_default_database="mysql" "rubycomplete.vim autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1 autocmd FileType ruby,eruby let g:rubycomplete_rails = 1 autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1 set cursorline highlight Search ctermfg=Green ctermbg=DarkGrey cterm=bold,underline