" Last modified: 2008-03-20 19:47:52 CET " some useful keyboard commands noremap :wq noremap :w noremap :q! set pastetoggle= " general options set nocp set modelines=5 set ruler set sw=2 set showmode set whichwrap="" set nojoinspaces set encoding=iso-8859-15 set autowrite set incsearch set ai set sm "set hlsearch set background=dark " Set textwidth to 72 for mail and news au FileType mail set tw=70 "au BufRead mutt*,.article,.followup,.letter set tw=72 " some programming things syntax on set makeprg=make\ %< au BufRead,BufNewFile *.[chly],*.cc,*.hh,*.cpp set cindent au BufRead,BufNewFile *.py set ts=4 au BufRead,BufNewFile *.java set ts=4 au BufRead,BufNewFile *.lisp set lisp " remove/delete trailing whitespace: nmap ;tr :%s/\s\+$// vmap ;tr :s/\s\+$// " timestamps " iab YDATE =strftime("%a %b %d %T %Z %Y") iab YDATE =strftime("%Y-%m-%d %T %Z") " update command UpdateTimestamp execute "normal 1G/Last modified:[ \t]\s*/e+1CYDATE#" " map ,L 1G/Last modified:\s*/e+1CYDATE# map ,L :UpdateTimestamp " automatically update for files containing the timestamp (presumably) au BufWritePre,FileWritePre * if search("Last modified:\s*") | exe "UpdateTimestamp" | endif " When editing a file, always jump to the last cursor position autocmd BufReadPost * if line("'\"") && line("'\"") <= line("$") | exe "normal `\"" | endif " comment out function map cf {i/*}i*/ " comment out line map cl ^i/*$a*/ map cul ^2x$xx