From: David Kerkeslager Date: Fri, 12 Jun 2015 14:37:19 +0000 (-0400) Subject: Filetype-specific tabstops X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=7a36d117d286d776893edd21a1184e5585884373;p=dotfiles Filetype-specific tabstops --- diff --git a/.vimrc b/.vimrc index 8bb879a..af5c4d6 100644 --- a/.vimrc +++ b/.vimrc @@ -37,11 +37,17 @@ set scrolloff=5 set noeb vb t_vb= " Set tabs to width 4. +filetype plugin indent on +set shiftwidth=4 set softtabstop=4 set tabstop=4 -set shiftwidth=4 set expandtab +" language-specific settings +autocmd FileType html setlocal shiftwidth=2 softtabstop=2 tabstop=2 +autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 tabstop=2 +autocmd FileType ruby setlocal shiftwidth=2 softtabstop=2 tabstop=2 + " Allow backspacing over everything in insert mode. set backspace=indent,eol,start