summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vimrc31
1 files changed, 27 insertions, 4 deletions
diff --git a/vimrc b/vimrc
index 382b5be..77907cb 100644
--- a/vimrc
+++ b/vimrc
@@ -1,14 +1,17 @@
+set nocompatible
 setlocal spell spelllang=en_us
 
 syn off
+filetype plugin indent on
 
 set autoindent
 set autowrite
-set expandtab
+set expandtab                   " expand tabs by default (overloadable per file type later)
 set ignorecase
+set incsearch
 set list
-set listchars=tab:>-,trail:~,extends:>,precedes:<
-set nohls
+set listchars=tab:>\ ,trail:~,extends:>,precedes:<
+set hls
 set nospell
 set ruler
 set viminfo=""
@@ -16,6 +19,11 @@ set viminfo=""
 set shiftwidth=2
 set smarttab
 set tabstop=2
+set softtabstop=4               " when hitting <BS>, pretend like a tab is removed, even if spaces
+set shiftround                  " use multiple of shiftwidth when indenting with '<' and '>'
+
+set wildmenu
+set wildmode=longest:full,full
 
 set nobackup                    " Don't create annoying backup files
 set noswapfile                  " Don't use swapfile
@@ -29,5 +37,20 @@ set encoding=utf-8              " Set default encoding to UTF-8
 
 set winminheight=0              " minimize split window
 
+set tags=tags;/                 " try to find the tags file in the path
+
+" makefile
+autocmd FileType make setlocal noexpandtab tabstop=4 shiftwidth=4
+
+" ruby
+autocmd FileType ruby setllocal expandtab stabstop=2 hiftwidth=2 softtabstop=2
+
+" golang
+autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
+autocmd BufWritePost *.go :silent !gofmt -w %
+
+" python indent
+autocmd FileType python setlocal tabstop=2 softtabstop=2 shiftwidth=2 textwidth=100 smarttab expandtab autoindent
 
-au BufNewFile,BufRead *.go setlocal noet ts=4 sw=4 sts=4
+set laststatus=2
+set statusline=%<%f\ %h%w%m%r%y%=L:%l/%L\ (%p%%)\ C:%c%V\ B:%o