Last active
August 29, 2015 14:18
-
-
Save Maddosaurus/3fef8f87ae1ea82b9291 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
" Based on Doug Black's blogpost: http://dougblack.io/words/a-good-vimrc.html | |
" Mentioned color scheme: https://github.com/sjl/badwolf/ | |
colorscheme badwolf " awesome colorscheme | |
syntax enable " enable syntax processing | |
set tabstop=4 " number of visual spaces per TAB | |
set softtabstop=4 " number of spaces in tab when editing | |
set expandtab " tabs are spaces | |
set number " show line numbers | |
set showcmd " show command in bottom bar | |
set cursorline " highlight current line | |
filetype indent on " load filetype-specific indent files | |
set wildmenu " visual autocomplete for command menu | |
set lazyredraw " redraw only when we need to. | |
set showmatch " highlight matching [{()}] | |
set incsearch " search as characters are entered | |
set hlsearch " highlight matches | |
" turn off search highlight | |
nnoremap <leader><space> :nohlsearch<CR> | |
augroup configgroup | |
autocmd! | |
autocmd VimEnter * highlight clear SignColumn | |
autocmd BufWritePre *.php,*.py,*.js,*.txt,*.hs,*.java,*.md | |
\:call <SID>StripTrailingWhitespaces() | |
autocmd FileType java setlocal noexpandtab | |
autocmd FileType java setlocal list | |
autocmd FileType java setlocal listchars=tab:+\ ,eol:- | |
autocmd FileType java setlocal formatprg=par\ -w80\ -T4 | |
autocmd FileType php setlocal expandtab | |
autocmd FileType php setlocal list | |
autocmd FileType php setlocal listchars=tab:+\ ,eol:- | |
autocmd FileType php setlocal formatprg=par\ -w80\ -T4 | |
autocmd FileType ruby setlocal tabstop=2 | |
autocmd FileType ruby setlocal shiftwidth=2 | |
autocmd FileType ruby setlocal softtabstop=2 | |
autocmd FileType ruby setlocal commentstring=#\ %s | |
autocmd FileType python setlocal commentstring=#\ %s | |
autocmd BufEnter *.cls setlocal filetype=java | |
autocmd BufEnter *.zsh-theme setlocal filetype=zsh | |
autocmd BufEnter Makefile setlocal noexpandtab | |
autocmd BufEnter *.sh setlocal tabstop=2 | |
autocmd BufEnter *.sh setlocal shiftwidth=2 | |
autocmd BufEnter *.sh setlocal softtabstop=2 | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment