Skip to content

Instantly share code, notes, and snippets.

Created March 24, 2009 13:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
""" .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>"
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k\|<\|/'
return "\<tab>"
elseif exists('&omnifunc') && &omnifunc == ''
return "\<c-n>"
return "\<c-x>\<c-o>"
inoremap <tab> <c-r>=InsertTabWrapper()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment