Last active
August 22, 2018 23:57
-
-
Save yusukegoto/3273d45074e89611fa97c4f0906e54a1 to your computer and use it in GitHub Desktop.
vimrc
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
"カーソルの位置情報 | |
set ruler | |
"新しい行のインデントを現在行と同じにする | |
set autoindent | |
"タブの代わりに空白文字を挿入する | |
set expandtab | |
"インクリメンタルサーチを行う | |
set incsearch | |
"タブ文字、行末など不可視文字を表示する | |
"set list | |
"listで表示される文字のフォーマットを指定する | |
set listchars=eol:$,tab:>\ ,extends:< | |
"行番号を表示する | |
set number | |
"シフト移動幅 | |
set shiftwidth=2 | |
"閉じ括弧が入力されたとき、対応する括弧を表示する | |
set showmatch | |
"検索時に大文字を含んでいたら大/小を区別 | |
set smartcase | |
"新しい行を作ったときに高度な自動インデントを行う | |
set smartindent | |
"行頭の余白内で Tab を打ち込むと、'shiftwidth' の数だけインデントする。 | |
set smarttab | |
"ファイル内の <Tab> が対応する空白の数 | |
set tabstop=2 | |
"カーソルを行頭、行末で止まらないようにする | |
set whichwrap=b,s,h,l,<,>,[,] | |
"検索をファイルの先頭へループしない | |
set nowrapscan | |
"検索後のハイライト | |
set hlsearch | |
"編集中のファイルのフルパスをウィンドウ上段に表示 | |
set title | |
"折り返し検索 | |
set wrapscan | |
"omni補完 | |
setlocal omnifunc=syntaxcomplete#Complete | |
" コードのハイライト | |
syntax on | |
augroup MyXML | |
autocmd! | |
autocmd Filetype xml inoremap <buffer> </ </<C-x><C-o> | |
autocmd Filetype html inoremap <buffer> </ </<C-x><C-o> | |
augroup END | |
"ベルを鳴らさない | |
set visualbell | |
:let g:closetag_html_style=1 | |
" :source ~/.vim/plugins/closetag.vim | |
augroup HighlightTrailingSpaces | |
autocmd! | |
autocmd VimEnter,WinEnter,ColorScheme * highlight TrailingSpaces term=underline guibg=Red ctermbg=Red | |
autocmd VimEnter,WinEnter * match TrailingSpaces /\s\+$/ | |
augroup END | |
autocmd BufRead,BufNewFile *.py setlocal tabstop=4 softtabstop=4 shiftwidth=4 | |
autocmd BufRead,BufNewFile *.rb setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
autocmd BufRead,BufNewFile *.ex setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
autocmd BufRead,BufNewFile *.exs setlocal tabstop=2 softtabstop=2 shiftwidth=2 | |
autocmd BufRead,BufNewFile *.json setlocal tabstop=2 softtabstop=2 shiftwidth=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment