" " Vim configuration file (~/.vimrc) " 2009, kolter " " This file is distributed in the hope that it will be useful, " but WITHOUT ANY WARRANTY " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" " General Settings " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" set nocompatible "no vi compatibility set history=200 "command history size set undolevels=120 "undo levels count set autoread "notify file changes set autochdir "switch to the current file directory set clipboard+=unnamed "share system clipboard set backup "enable backups set backupdir=~/.vim/backups "backup directory set directory=~/.vim/tmp "directory to place swap files in "Encoding settings if has("multi_byte") if &termencoding == "" let &termencoding = &encoding endif set encoding=utf-8 setglobal fileencoding=utf-8 bomb set fileencodings=ucs-bom,utf-8,default,latin1 endif "Syntax highlight syntax on set t_Co=256 set bg=dark colorscheme xoria256 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Interface Settings " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" set title "show title set number "show line numbers set ruler "statusline for each window set visualbell t_vb= "visual beep set showcmd "show incomplete commands set confirm "raise a dialog asking what to do instead of failing "set mouse=a "enable mouse support set lazyredraw "do not redraw when running macros set ttyfast "fast terminal connection support set shortmess=a "abbreviations on status line set laststatus=2 "always statusline set statusline=%<%F\ %h%m%r%y%=%{\"[\".(&fenc==\"\"?&enc:&fenc).((exists(\"+bomb\")\ &&\ &bomb)?\",B\":\"\").\"]\ \"}%k\ %-14.(%l,%c%V%)\ %P set wildmenu "display completion menu set wildmode=list:longest,list:full "content of completion menu "ignore some extensions while completing filename "set wildignore=*.o,*.so,,*.gz,*.bz2,*.tar,*.tgz,*.tbz2,*.png,*.jpg,*.jpeg,*.gif set wildchar= "wildcar expansion character set modeline "allow last lines of documents set vim mode set modelines=3 "number of lines to check for modelines """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Keyboard Settings " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""" " keep ctrl-a/ctrl-e for begining/end of line nmap I imap I vmap I nmap A imap A vmap A "reopen current file map :e! "using redraw to disable highlighted search patterns nnoremap :nohl "map F1 to open previous buffer nmap :bp imap :bpa "map F2 to open next buffer nmap :bn imap :bna "imap "smart completion nmap :u imap :u nmap :tabnext "nmap :tabprevious nmap :tabnew "nmap :tabclose nmap :call CleanClose() nmap :vsplit nmap :split "ctrl-$arrow no cycle around splitted windows map h map l map k map j "ident in visual mode keep selection vmap > >gv vmap <