Skip to content

Instantly share code, notes, and snippets.

@daiki44
Last active August 11, 2017 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daiki44/3f11e821e95871f3445a0053c87b996c to your computer and use it in GitHub Desktop.
Save daiki44/3f11e821e95871f3445a0053c87b996c to your computer and use it in GitHub Desktop.
vimで言語ごとにインデントの大きさを変えてみた ref: http://qiita.com/daiki_44/items/8da9d4f89bb295f1399d
" default
set tabstop=4
set shiftwidth=4
" filetypeによって設定を変える
filetype plugin indent on
augroup filetypedetect
" 読み込み時、新規ファイル作成時に、.rb, .erbで終わるファイルだったら、ruby用の設定ファイルを読み込む
au BufRead, BufNewFile *.rb *.erb setfiletype ruby
augroup END
mkdir ~/.vim/indent
" rails用
set expandtab
set tabstop=2
set shiftwidth=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment