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.
16 " Example filetype-specific setting:
18 " autocmd filetype python set expandtab
30 " Scroll five lines ahead of cursor.
33 " Turn off error bells and visual bell
36 " Set up autoindentation.
40 " Set tabs to width 4.
46 " Allow backspacing over everything in insert mode.
47 set backspace=indent,eol,start
49 "Highlight bad spacing.
50 highlight BadSpacing term=standout ctermbg=cyan
53 " Highlight tabulators and trailing spaces
54 autocmd BufNewFile,BufReadPre * match BadSpacing /\(\t\| *$\)/
55 " Only highlight trailing space in tab-filled formats
56 autocmd FileType help,make match BadSpacing / *$/
59 " Highlight search terms.
65 " Display command and location status.
69 " Multiple windows are equally sized and open in reading order.
71 set splitbelow splitright
76 " Enlarge history and undo/redo buffers.
80 " Reset colors to a clean state.
81 if !has('gui_running')
85 " Enable syntax highlighting.
88 " Force vim to sync syntax highlighting from the beginning of the file.
91 " Set the color scheme to desert.
94 " Unmap the arrow keys to prevent bad habits.
100 noremap! <Left> <Esc>
102 noremap! <Right> <Esc>
104 " Map open and close items in insert mode.
105 " Keep this commented out until I can get it working better.
106 "inoremap { {<CR>}<Esc>O
109 "inoremap } <Esc>/}<CR>o
110 "inoremap ] <Esc>/]<CR>a
111 "inoremap ) <Esc>/)<CR>a
113 " Automatically reload the .vimrc when changes are made to it
114 au! BufWritePost .vimrc source %