" $Id: .vimrc,v 0.9 2010/07/31 12:03:58 stef Exp $ " " vim initialization file " Stefan Pettersson, http://www.bigpointyteeth.se/ set nocompatible set nobackup " disable creation of backup files set noswapfile " disable use of swap files syntax on filetype plugin indent on " auto-detect filetypes for highlighting set background=dark " we prefer a dark terminal set backspace=indent,eol,start " allow backspace in INSERT mode set virtualedit=all " allow the cursor to roam freely in command mode set lbr " wrap on words visually "set textwidth=72 " wrap on 72 characters wide set scrolloff=3 " keep three lines visible when scrolling " expand tabs to 4 spaces set tabstop=4 set shiftwidth=4 set expandtab set autoindent " copy indent from current line when starting a new line set smartindent " smart indenting when starting new line (for C-like lang) "set cindent " better than smartindent for real C set pastetoggle= " prevent indentation from fucking up your paste set showmatch " jump briefly to the corresponding brace/bracket/paranthesis set ruler " always show cursor position in lower right corner "set number " show line numbers set showcmd " show the typed command next to ruler set incsearch " display match for search pattern as you type it set ignorecase smartcase " ignore case (somtimes :-) set hlsearch " and hilite the found " time and date stamps iab xdate =strftime("%Y-%m-%d") iab xtime =strftime("%H:%M:%S") " quick movement between split windows map h map l map j_ map k_ " fix html entities for swedish characters noremap :%s/å/\å/g:%s/ä/\ä/g:%s/ö/\ö/g:%s/Å/\å/g:%s/Ä/\ä/g:%s/Ö/\ö/g " large comment noremap i#################################################################################################O# " show line numbers flip-flop noremap :set number! " jump back and forth between files noremap :bp noremap :bn " remove hilights (from searches etc) noremap :nohl " options when running GUI (Windows) if has('gui_running') set guioptions-=T " no toolbar "set guifont=Consolas:h8 set guifont=Lucida_console:h7 winsize 100 50 colorscheme desert endif " eof