Skip to content

Commit

Permalink
Several misc changes:
Browse files Browse the repository at this point in the history
- ruler
- nohidden (to enable buffers)
- noexpandtab for golang files (`go fmt` prefers tabs)
- commented out ctags generation
- don't strip whitespace for diff files (useful when editing with `git add -p`)
  • Loading branch information
larsbutler committed Mar 5, 2013
1 parent 288a6c3 commit 26872f7
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
"
:syntax on
:set number
:set ruler
:colorscheme inkpot
:set expandtab
:set tabstop=4
:set shiftwidth=4
:set incsearch
:set cursorline
:set nohidden

" Makefile settings
"
" Tabs are important in Makefiles
:autocmd FileType make setlocal noexpandtab
" go fmt also prefers tabs to spaces
:autocmd FileType go setlocal noexpandtab

" ctags settings
"
Expand All @@ -26,12 +30,16 @@
" This makes pep8 happy.
:autocmd BufRead,BufNewFile *.py match ErrorMsg '\%>79v.\+'
" When a .py file is written, recreate tags in the current dir.
au BufWritePost *.py silent! !ctags -R &
" au BufWritePost *.py silent! !ctags -R &

" Trim trailing whitespace:
function TrimWhiteSpace()
: %s/\s*$//
: ''
" Don't strip whitespace on these filetypes
if &ft =~ 'diff'
return
endif
%s/\s*$//
''
:endfunction

set list listchars=tab:»·,trail:·
Expand Down

0 comments on commit 26872f7

Please sign in to comment.