Add build-essential and nmap
[invirt/packages/xvm-support-config.git] / .vimrc
1 " Vimrc file for Christian Andersen, http://phuzz.org
2 " Heavily modified by Robert Iannucci, http://www.rail.com
3 " Stolen with pride by Peter Iannucci
4
5 set nocompatible    " use vim defaults
6 set ls=2            " allways show status line
7 set tabstop=4       " numbers of spaces of tab character
8 set expandtab           " Expand tabs to spaces
9 set shiftwidth=4    " numbers of spaces to (auto)indent
10 set scrolloff=3     " keep 3 lines when scrolling
11 set showcmd         " display incomplete commands
12 set hlsearch        " highlight searches
13 set incsearch       " do incremental searching
14 set ruler           " show the cursor position all the time
15 set visualbell t_vb=    " turn off error beep/flash
16 set novisualbell    " turn off visual bell
17 set number          " show line numbers
18 set ignorecase     " ignore case when searching 
19 set timeoutlen=200  " set faster timeout
20 set title           " show title in console title bar
21 set ttyfast         " smoother changes
22 set modeline        " last lines in document sets vim mode
23 set modelines=3     " number lines checked for modelines
24 set shortmess=atI   " Abbreviate messages
25 set nostartofline   " don't jump to first character when paging
26 set whichwrap=b,s,<,>,[,]   " move freely between files
27 let c_space_errors = 1
28
29 set sm             " show matching braces, somewhat annoying...
30 set nowrap         " don't wrap lines
31
32 syntax on           " syntax highlighing
33
34 colorscheme elflord " use this color scheme
35 set background=dark     " adapt colors for background
36
37 if has("autocmd")
38     " Restore cursor position
39     au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
40
41     " Filetypes (au = autocmd)
42     au FileType helpfile set nonumber       " no line numbers when viewing help
43     au FileType helpfile nnoremap <buffer><cr> <c-]>    " Enter selects subject
44     au FileType helpfile nnoremap <buffer><bs> <c-T>    " Backspace to go back
45
46     au FileType cpp set nofoldenable
47     au FileType cpp set foldcolumn=0
48     au FileType cpp set cindent
49     au FileType cpp set smartindent
50     au FileType cpp set autoindent
51     au FileType c set nofoldenable
52     au FileType c set foldcolumn=0
53     au FileType c set cindent
54     au FileType c set smartindent
55     au FileType c set autoindent
56     au FileType java set nofoldenable
57     au FileType java set foldcolumn=0
58     au FileType python set foldmethod=syntax
59     au FileType python set foldcolumn=0
60     au FileType python set nocindent
61     au FileType python set nosmartindent
62     au FileType python set noautoindent
63
64     " File formats
65     autocmd BufRead *.py inoremap # X<c-h>#
66 endif
67
68 " Keyboard mappings
69 map <silent> <C-N> :silent noh<CR> " turn off highlighted search
70
71 set bs=2
72
73 au FileType make setlocal noexpandtab  " Turn off expandtabs for Makefiles so they don't get screwed up
74 set softtabstop=4   " makes the spaces feel like real tabs 
75
76 set wildmenu
77
78 nnoremap  \  <C-^>
79
80 function! FancyRedraw ()
81     if &diff
82         diffupdate
83     else
84         redraw
85     endif
86 endfunction
87
88 nmap <silent> <C-L> :call FancyRedraw()<CR>