" In Linux, save this file as ~/.vimrc " In Windows, save this file as ...\Documents and Settings\[User]\_vimrc set nocompatible "" inform vim of certain keycodes for terminal editing if !has("gui_running") if &term == "xterm" set = set =O1;2A set =O1;2B set =O1;2C set =O1;2D " set =OF " set =OH " set =O1;5A " set =O1;5B set =O1;5C set =O1;5D " elseif &term == "win32" " ... " else " .. endif endif " use Windows-style key mappings source $VIMRUNTIME/mswin.vim " prevent annoying behavior of some keys in selection mode vunmap d vunmap u " make CTRL-Z and CTRL-Y work in visual/selection mode vnoremap u vnoremap "inoremap ghb " Make cursor keys ignore wrapping nnoremap gk inoremap gk nnoremap gj inoremap gj nnoremap g0 inoremap g0 nnoremap g$ inoremap g$ nnoremap ghgk inoremap ghgk vnoremap gk nnoremap ghgj inoremap ghgj vnoremap gj " CTRL-T and CTRL-D indent and unindent blocks inoremap nnoremap vnoremap > vnoremap " CTRL-TAB inserts a tab character (i.e., does not replace tab with spaces) inoremap " CTRL-F does Find dialog instead of page forward noremap :promptfind vnoremap y:promptfind " onoremap :promptfind inoremap :promptfind cnoremap :promptfind " CTRL-H does Replace dialog instead of character left noremap :promptrepl vnoremap y:promptrepl " onoremap :promptrepl inoremap :promptrepl cnoremap :promptrepl " F7 runs 'make' nnoremap :update:make inoremap :update:make vnoremap :update:make " F5 runs 'make run' nnoremap :update:!make run inoremap :update:!make run vnoremap :update:!make run " CTRL-R reloads the ~/.vimrc file nnoremap :source ~/.vimrc inoremap :source ~/.vimrc vnoremap :source ~/.vimrc set nobackup " don't back up file before saving set autowrite " automatically save before making set history=500 "set co=80 "set lines=25 set tabpagemax=30 " maximum number of tabs set number " show line numbers set ruler " show ruler set showcmd " show command line set expandtab " turns tabs into spaces set tabstop=4 " number of spaces per tab set autoindent set smartindent set shiftwidth=4 " number of spaces per shift if has("autocmd") " use 2-space indentation for HTML and TeX files au FileType tex,html setlocal tabstop=2 shiftwidth=2 endif set showmatch " brace matching syntax on " syntax highlighting set incsearch " incremental search set ignorecase " search ignores case set hlsearch " highlight search results (":nohlsearch" unhighlights) set noerrorbells " no error beep/flash set visualbell set t_vb= if has('autocmd') autocmd GUIEnter * set vb t_vb= endif "colorscheme desert "hi Normal guifg=#d0d0d0 guibg=#181818 let g:zenburn_high_Contrast=1 colorscheme zenburn set gfn=DejaVu\ Sans\ Mono\ 11 start " start vim in insert mode