"-------------------------------------------------------------------- " $Id: vimrc,v 2.1 2008/06/20 10:20:00 drscream Exp $ " Copyright 2007 Frubar Network (drscream@frubar.net) "-------------------------------------------------------------------- " DEFAULT SET set runtimepath=$DOC_HOME/.vim,$VIMRUNTIME set title " Show filename set showmode " Show current mode set showcmd " Show command mode set nocompatible " Use Vim defaults (much better!) set bs=2 " Allow backspacing over everything in insert mode set ai " Always set auto-indenting on set history=50 " keep 50 lines of command history set ruler " Show the cursor position all the time set viminfo='20,\"500 " Keep a .viminfo file set pastetoggle= " Toggle between paste mode on/off set hlsearch " Highlight search set smartindent " Set indention set shiftwidth=4 " Shift width set tabstop=4 " Tab size set icon " Icon text of the window set confirm " Extra dialog set hlsearch " Highlight searching result set noincsearch " Disable incremental searching set ignorecase smartcase " Case-insensitive searching "set backup " Backup options "set backupdir=~/.vim/backup " Backup dir "spell checking set spelllang=en,de " Spell cheching language set spellsuggest=double,10 " Description of the spell-checker " zg to add word to word list " zw to reverse " zug to remove word from word list " z= to get list of possibilities "show tabs, EOL etc. set lcs=tab:»· set lcs+=trail:· "set lcs+=eol:¶ set lcs+=precedes:« set lcs+=extends:» if v:version >= 700 set lcs+=nbsp:· endif " Tab Wrapper function function InsertTabWrapper() let col = col('.') - 1 if !col || getline('.')[col - 1] !~ '\k' return "\" else return "\" endif endfunction " COLORSCHEME colorscheme torte syntax on map Q gq " KEY MAPS map :set spell!:echo "Spell check: " . strpart("OffOn", 3 * &spell, 3) map :set cursorline!:echo "Highlight active cursor line: " . strpart("OffOn", 3 * &cursorline, 3) map :set list!:echo "Display Tabs, EOL: " . strpart("OffOn", 3 * &list, 3) map :set number!:echo "Display Number: " . strpart("OffOn", 3 * &number, 3) inoremap =InsertTabWrapper() nnoremap :next nnoremap :prev " ENCODING " Always check for UTF-8 when trying to determine encodings if &fileencodings !~? "utf-8" set fileencodings+=utf-8 endif " Make sure we have a sane fallback for encoding detection set fileencodings+=default " SOURCE IMPORT " Source vimrc.fix file, fix vim bugs let VIM_FIX=expand("$DOC_HOME/.vim/vimrc.fix") if filereadable(VIM_FIX) exe "source " VIM_FIX endif " SPECIAL FILETYPES augroup filetype au! BufRead,BufNewFile *.acl set filetype=ciscoacl augroup END