4 " Make tab-completion work more like bash.
8 " Ignore certain file extensions when tab-completing.
9 set wildignore=*.swp,*.bak,*.pyc,*.class,*.o,*.exe
11 " Set filetype stuff to on.
15 " Set up autoindentation.
19 " Example filetype-specific setting:
21 " autocmd filetype python set expandtab
33 " Scroll five lines ahead of cursor.
36 " Turn off error bells and visual bell
39 " Set tabs to width 4.
40 filetype plugin indent on
46 " language-specific settings
47 autocmd FileType html setlocal shiftwidth=2 softtabstop=2 tabstop=2
48 autocmd FileType javascript setlocal shiftwidth=2 softtabstop=2 tabstop=2
49 autocmd FileType ruby setlocal shiftwidth=2 softtabstop=2 tabstop=2
51 " Allow backspacing over everything in insert mode.
52 set backspace=indent,eol,start
54 "Highlight bad spacing.
55 highlight BadSpacing term=standout ctermbg=cyan
58 " Highlight tabulators and trailing spaces
59 autocmd BufNewFile,BufReadPre * match BadSpacing /\(\t\| *$\)/
60 " Only highlight trailing space in tab-filled formats
61 autocmd FileType help,make match BadSpacing / *$/
67 " Display command and location status.
71 " Multiple windows are equally sized and open in reading order.
73 set splitbelow splitright
78 " Enlarge history and undo/redo buffers.
82 " Reset colors to a clean state.
83 if !has('gui_running')
87 " Enable syntax highlighting.
90 " Force vim to sync syntax highlighting from the beginning of the file.
93 " Set the color scheme to desert.
96 " Unmap the arrow keys to prevent bad habits.
100 noremap! <Down> <Esc>
102 noremap! <Left> <Esc>
104 noremap! <Right> <Esc>
106 " Automatically reload the .vimrc when changes are made to it
107 au! BufWritePost .vimrc source %