Last active
August 29, 2015 14:04
-
-
Save kevints/3591e1a82c4f0af9c713 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 nocompatible | |
if $COLORTERM == 'gnome-terminal' | |
set t_Co=256 | |
endif | |
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
" Twitter Code Style | |
func! TwitterCodeStyle() | |
set expandtab tabstop=2 softtabstop=2 shiftwidth=2 | |
set smartindent | |
set smarttab | |
set textwidth=100 | |
set colorcolumn=+1 | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
match ExtraWhitespace /\s\+$/ | |
" IntelliJ mode | |
endfunc | |
func! TwitterPythonDSL() | |
setf python | |
call TwitterCodeStyle() | |
endfunc | |
func! TwitterBUILDDSL() | |
setf python | |
syntax pythonBuiltin dependencies | |
call TwitterCodeStyle() | |
endfunc | |
" Whitespace warrior | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
match ExtraWhitespace /\s\+$/ | |
autocmd filetype python call TwitterCodeStyle() | |
autocmd filetype scala call TwitterCodeStyle() | |
autocmd filetype java call TwitterCodeStyle() | |
autocmd filetype ruby call TwitterCodeStyle() | |
autocmd filetype sh call TwitterCodeStyle() | |
autocmd filetype html call TwitterCodeStyle() | |
" Python DSLs | |
autocmd bufread BUILD call TwitterPythonDSL() | |
autocmd bufread *.mesos call TwitterPythonDSL() | |
autocmd bufread *.aurora call TwitterPythonDSL() | |
autocmd bufread *.thermos call TwitterPythonDSL() | |
autocmd bufread *.thrift call TwitterCodeStyle() | |
autocmd bufread *.thrift setf thrift | |
autocmd bufread *.thrift set virtualedit=all | |
autocmd bufread *.gradle setf groovy | |
colorscheme solarized | |
set background=light | |
set backspace=eol,start,indent | |
set ruler | |
if has('gui') | |
set guifont=Monaco:h13 | |
set columns=102 | |
endif | |
set tags=~/tags |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment