" ----------------------------------- "" general settings " ----------------------------------- set nocompatible " a specific backupdir makes sure you don'd have flying around all these " dead backup files -> clean up the dir frequently set backupdir=$HOME/.vim/backupdir " ...or use "set nobackup """""""""""""""""""""""""""""""""""""""""" "" Eye candy and geometry """""""""""""""""""""""""""""""""""""""""" " Take care of the colors rxvt-unicode can display, note the also mrxvt honours " these settings and maybe othe rxvt clones as well! if $COLORTERM =~ 'rxvt' && $COLORFGBG =~ 'default;0' set t_Co=88 "set t_Sf=[3%dm "set t_Sb=[4%dm elseif $COLORTERM =~ 'rxvt' && $COLORFGBG =~ 'default;default' set t_Co=88 "set t_Sf=[3%dm "set t_Sb=[4%dm elseif $COLORTERM =~ 'rxvt-xpm' set t_Co=256 elseif $COLORFGBG =~ 'default;default' " a fallback for mlterm and other terms set t_Co=16 set t_AB=[%?%p1%{8}%<%t25;%p1%{40}%+%e5;%p1%{32}%+%;%dm set t_AF=[%?%p1%{8}%<%t22;%p1%{30}%+%e1;%p1%{22}%+%;%dm else " xterm has neither variable set ... set t_Co=256 endif " Now when vim knows terminal capabilities, we start colorizing if has("gui_running") colorscheme desert else colorscheme tenum endif set background=dark set syntax=on set previewheight=5 set textwidth=0 " set nowrap set ruler set cursorline hi CursorLine cterm=NONE ctermbg=80 hi MatchParen ctermbg=13 hi CursorColumn ctermbg=17 " autoindenting (local to buffer) set ai " smartindenting (clever autoindenting) set si " number of spaces the tab stands for set tabstop=3 " number of spaces used for (auto)indenting set shiftwidth=3 " If we find tabs we wanna preserve them and don't convert to spaces set noexpandtab " a in an indent insets 'shiftwidth' spaces (not tabstop) set nosmarttab " if non-zero, number of spaces to insert for a set softtabstop=3 " enable specific indenting for c-code and others set cindent set spelllang=en " some settings and other shortcuts... set wmh=0 set ic " map :w set pastetoggle= set ttyfast set title " shift key somtimes needs a bit to release command WQ wq " Search and substitute " highlight matches set hls " highlight while typing set incsearch " jump to matches on typing pattern set sm " automatically start over at EOF set wrapscan " case-insenitiv search set ignorecase " case insensitive if uppercase chars in pattern set scs " g-flag default -> replace all matches in a line "set gdefault """"""""""""""""""""""""""""""""""""""""""""""""" " map tabpages -terminal style """"""""""""""""""""""""""""""""""""""""""""""""" if ! has('gui_running') && $COLORTERM =~ 'rxvt-xpm' && $COLORFGBG != "" map n :tabnext map p :tabprev elseif ! has('gui_running') && &t_Co==256 map  :tabnext map  :tabprev endif """"""""""""""""""""""""""""""""""""""""""""""""" "" set visible whitespaces """"""""""""""""""""""""""""""""""""""""""""""""" "set listchars=tab:→ ,trail:·⋅•… "set listchars=tab:» ,trail:· "set listchars=tab:Γ¯,trail:· "set listchars=tab:÷—,trail:· "set listchars=tab:→—,trail:· set listchars=tab:»—,trail:• set nolist nnoremap \tl :set invlist list? nmap \tl """"""""""""""""""""""""""""""""""""""""""""""""" "" mouse in vim """"""""""""""""""""""""""""""""""""""""""""""""" "set mousemodel=extend " Allow vim to accept mouse stuff in terminal. "map [62~ "map! [63~ "map [63~ "map! [63~ "map [64~ "map! [64~ "map [65~ "map! [65~ "set mouse=a """"""""""""""""""""""""""""""""""""""""""""""""" "" some other nice settings ... """"""""""""""""""""""""""""""""""""""""""""""""" " line numbers always on set number " exclude filetypes from browse listings let g:netrw_list_hide='\.pyc$,\.swp$'