92fe29238edd01417616e787ed4ab98cc6bb9ade
[dotfiles] / .vimrc
1 " Don't imitate vi.
2 set nocompatible
3
4 " Show line numbers.
5 set number
6 set numberwidth=4
7
8 " Scroll five lines ahead of cursor.
9 set scrolloff=5
10
11 " Set up autoindentation.
12 set smartindent
13 filetype indent on
14
15 " Set tabs to width 4.
16 set softtabstop=4
17 set tabstop=4
18 set shiftwidth=4
19 set expandtab
20
21 " Search as you type.
22 set incsearch
23
24 " Display command and location status.
25 set ruler
26 set showcmd
27
28 " Multiple windows are equally sized and open in reading order.
29 set equalalways
30 set splitbelow splitright
31
32 " Line wrapping off
33 set nowrap
34
35 " Reset colors to a clean state.
36 if !has('gui_running')
37         set t_Co=8 t_md=
38 endif
39
40 " Enable syntax "highlighting.
41 syntax enable
42
43 " Force vim to sync syntax "highlighting from the beginning of the file.
44 syn sync fromstart
45
46 " Set the color scheme to desert.
47 colorscheme desert
48
49 " Unmap the arrow keys to prevent bad habits.
50 noremap  <Up> ""
51 noremap! <Up> <Esc>
52 noremap  <Down> ""
53 noremap! <Down> <Esc>
54 noremap  <Left> ""
55 noremap! <Left> <Esc>
56 noremap  <Right> ""
57 noremap! <Right> <Esc>
58
59