From: David Kerkeslager Date: Tue, 14 Sep 2010 15:57:11 +0000 (-0700) Subject: Adding some ideas from nvie's .vimrc (http://github.com/nvie/vimrc/raw/master/vimrc). X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=1c26f72621f29acadda8dce267e8111dc4cbd5f1;p=dotfiles Adding some ideas from nvie's .vimrc (github.com/nvie/vimrc/raw/master/vimrc). --- diff --git a/.vimrc b/.vimrc index e0ba2ef..10703a9 100644 --- a/.vimrc +++ b/.vimrc @@ -1,6 +1,19 @@ " Don't imitate vi. set nocompatible +" Ignore certain file extensions when tab-completing. +set wildignore=*.swp,*.bak,*.pyc,*.class,*.o + +" set filetype stuff to on +filetype on +filetype plugin on +filetype indent on + +" Example filetype-specific setting: +" if has('autocmd') +" autocmd filetype python set expandtab +" endif + " Show line numbers. set number set numberwidth=4 @@ -18,16 +31,22 @@ set tabstop=4 set shiftwidth=4 set expandtab +" Allow backspacing over everything in insert mode +set backspace=indent,eol,start + "Highlight bad spacing highlight BadSpacing term=standout ctermbg=cyan augroup Spacing autocmd! - " Highlight tabulators and trailing spaces (nasty bastards) + " Highlight tabulators and trailing spaces autocmd BufNewFile,BufReadPre * match BadSpacing /\(\t\| *$\)/ " Only highlight trailing space in tab-filled formats autocmd FileType help,make match BadSpacing / *$/ augroup END +" Highlight search terms. +set hlsearch + " Search as you type. set incsearch @@ -42,15 +61,19 @@ set splitbelow splitright " Line wrapping off set nowrap +" Enlarge history and undo/redo buffers +set history=1000 +set undolevels=1000 + " Reset colors to a clean state. if !has('gui_running') - set t_Co=8 t_md= + set t_Co=8 t_md= endif -" Enable syntax "highlighting. +" Enable syntax highlighting. syntax enable -" Force vim to sync syntax "highlighting from the beginning of the file. +" Force vim to sync syntax highlighting from the beginning of the file. syn sync fromstart " Set the color scheme to desert.