Skip to content

Instantly share code, notes, and snippets.

@tastyone
Last active October 10, 2018 10:08
Show Gist options
  • Save tastyone/5ad47d7cb3d10cba1a01 to your computer and use it in GitHub Desktop.
Save tastyone/5ad47d7cb3d10cba1a01 to your computer and use it in GitHub Desktop.
.vimrc
syntax on
set expandtab
set shiftwidth=2
set softtabstop=2
set tabstop=4
au BufRead,BufNewFile Podfile,*.podspec set filetype=ruby
autocmd Filetype html setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
autocmd Filetype javascript setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4
" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" for golang
autocmd Filetype go setlocal ts=4 sw=4 sts=0 expandtab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment