This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" .vimrc | |
" 文字コード判定 | |
set fencs=iso-2022-jp,euc-jp,cp932 | |
" ステータスラインを常に表示 | |
set laststatus=2 | |
" ステータスラインに文字コードと改行文字を表示する | |
set statusline=%<%f\ %m%r%h%w%{'['.(&fenc!=''?&fenc:&enc).']['.&ff.']'}%=%l,%c%V%8P | |
" ESCキー2度押しでハイライトを消す | |
set hlsearch | |
nnoremap <Esc><Esc> :<C-u>set nohlsearch<Return> | |
nnoremap / :<C-u>set hlsearch<Return>/ | |
nnoremap ? :<C-u>set hlsearch<Return>? | |
nnoremap * :<C-u>set hlsearch<Return>* | |
nnoremap # :<C-u>set hlsearch<Return># | |
" インデント設定 | |
set shiftwidth=4 | |
set tabstop=4 | |
set autoindent | |
" Omni 補完をタブキーで行う | |
function InsertTabWrapper() | |
if pumvisible() | |
return "\<c-n>" | |
endif | |
let col = col('.') - 1 | |
if !col || getline('.')[col - 1] !~ '\k\|<\|/' | |
return "\<tab>" | |
elseif exists('&omnifunc') && &omnifunc == '' | |
return "\<c-n>" | |
else | |
return "\<c-x>\<c-o>" | |
endif | |
endfunction | |
inoremap <tab> <c-r>=InsertTabWrapper()<cr> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment