" charcode if &encoding !=# 'utf-8' set encoding=japan set fileencoding=japan endif if has('iconv') let s:enc_euc = 'euc-jp' let s:enc_jis = 'iso-2022-jp' if iconv("\x87\x64\x87\x6a", 'cp932', 'eucjp-ms') ==# "\xad\xc5\xad\xcb" let s:enc_euc = 'eucjp-ms' let s:enc_jis = 'iso-2022-jp-3' elseif iconv("\x87\x64\x87\x6a", 'cp932', 'euc-jisx0213') ==# "\xad\xc5\xad\xcb" let s:enc_euc = 'euc-jisx0213' let s:enc_jis = 'iso-2022-jp-3' endif if &encoding ==# 'utf-8' let s:fileencodings_default = &fileencodings if has('mac') let &fileencodings = s:enc_jis .','. s:enc_euc let &fileencodings = &fileencodings .','. s:fileencodings_default else let &fileencodings = s:enc_jis .','. s:enc_euc .',cp932' let &fileencodings = &fileencodings .','. s:fileencodings_default endif unlet s:fileencodings_default else let &fileencodings = &fileencodings .','. s:enc_jis set fileencodings+=utf-8,ucs-2le,ucs-2 if &encoding =~# '^\(euc-jp\|euc-jisx0213\|eucjp-ms\)$' set fileencodings+=cp932 set fileencodings-=euc-jp set fileencodings-=euc-jisx0213 set fileencodings-=eucjp-ms let &encoding = s:enc_euc let &fileencoding = s:enc_euc else let &fileencodings = &fileencodings .','. s:enc_euc endif endif unlet s:enc_euc unlet s:enc_jis endif if has('autocmd') function! AU_ReCheck_FENC() if &fileencoding =~# 'iso-2022-jp' && search("[^\x01-\x7e]", 'n') == 0 let &fileencoding=&encoding endif endfunction autocmd BufReadPost * call AU_ReCheck_FENC() endif set fileformats=unix,dos,mac if exists('&ambiwidth') set ambiwidth=double endif nnoremap j gj nnoremap k gk nnoremap J nnoremap K set expandtab set shiftround set autoindent set backspace=indent,eol,start set hidden set history=50 set hlsearch set ignorecase set incsearch set laststatus=2 set nobackup set ruler set shiftwidth=2 set showcmd set showmatch set smartcase set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P set tabstop=2 set wrapscan syntax on filetype on filetype indent on filetype plugin on autocmd CursorHold * update set updatetime=500 "set encoding=utf-8 "set fileencoding=utf-8 "set fileencodings=utf-8,euc-jp,iso-2022-jp,utf-8,ucs-2le,ucs-2,cp932 set ambw=double set number set wildmenu " minibufexpl.vim let g:miniBufExplMapWindowNavVim = 1 let g:miniBufExplMapWindowNavArrows = 1 let g:miniBufExplMapCTabSwitchBuffs = 1 nmap :MBEbn nnoremap :MBEbn nnoremap L :MBEbn nnoremap H :MBEbp nnoremap :badd nnoremap :bd nnoremap :IncBufSwitch nnoremap :wincmd w nnoremap :ls " http://d.hatena.ne.jp/kasahi/20070902/1188744907 highlight WhitespaceEOL ctermbg=red guibg=red match WhitespaceEOL /\s\+$/ autocmd WinEnter * match WhitespaceEOL /\s+\+$/ " ActionScript Syntax au BufNewFile,BufRead *.as set filetype=actionscript au BufNewFile,BufRead *.mxml set filetype=mxml " skk.vim let skk_jisyo = '~/.skk-jisyo' let skk_large_jisyo = '~/Library/AquaSKK/SKK-JISYO.L' let skk_auto_save_jisyo = 1 let skk_keep_state = 0 let skk_egg_like_newline = 1 let skk_show_annotation = 1 let skk_use_face = 1