vimrc v1 2008/11/24
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
set fileencodings=utf-8,latin1
endif
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
" 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
if &term=="xterm-256color"
set t_Co=256
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
nnoremap <silent> <F8> :TlistToggle<CR>
nmap <C-N> :cn<CR>
nmap <C-P> :cp<CR>
nmap <UP> :tabnew<CR>
nmap <DOWN> :tabclose<CR>
nmap <LEFT> :tabprevious<CR>
nmap <RIGHT> :tabnext<CR>
noremap j gj
noremap k gk
set vb " ビープを鳴らさない
set nu " 行番号の表示
set et " TAB 文字をスペースに展開
set hid " バッファを切り替えても Undo 出来るようにする
set ignorecase " 検索時に大文字小文字を無視 (noignorecase:無視しない)
set smartcase " 大文字小文字の両方が含まれている場合は大文字小文字を区
別
set autoindent " 自動的にインデントする
set ruler " ルーラの表示
set wrap " 長い行を折り返す
set showcmd " コマンドをステータス行に表示
set title " タイトルを表示
set nobackup " バックアップファイルを作らない
set wrapscan " 検索時にファイルの最後まで行ったら最初に戻る (nowrapscan:戻らない)
set showmatch " 括弧入力時に対応する括弧を表示 (noshowmatch:表示しない
)
set wildmenu " コマンドライン補完するときに強化されたものを使う(参照 :help wildmenu)
set backspace=2 " バックスペースでインデントや改行の削除を出来るようにす
る
set ts=4 " TAB (文字コード:0x09) の表示幅
set sw=4 " オートインデントで挿入されるタブの幅
set sts=4 " TAB Key 押下時に挿入される幅
set bdir=~/temp " バックアップファイルの作成場所
set dir=~/temp " スワップファイルの作成場所の指定
set fenc=utf-8
set ff=unix
set helplang=ja,en
set laststatus=2 " ステータスバー常時表示
" n Number バッファナンバー
" f String カレントディレクトリから見た相対パス
" m Flag 更新フラグ [+] | [-]
" r Flag リードオンリーフラグ [RO] |
" l Number 行数
" c Number 列数
set statusline=%<[%02n]%*\ %f\ %m%r%w%{'['.(&ft!=''?&ft:'text').']'}%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P
let html_use_css = 1 " TOHtml で作成される HTML で CSS を使用する
最終更新:2008年11月24日 10:26