" ======================================================= " Vim configuration file " Author: Nico Golde " Homepage: http://www.ngolde.de " ~/.vimrc " Latest change: Di Feb 15 15:21:38 CET 2005 " ======================================================= " ======================================== " Settings " ======================================== " settings for the c language au FileType c set ai et sw=4 ts=4 " no line numbers in mail au FileType mail set nonu " show the laststatus line always set laststatus=2 " give cursor position set ruler " make no backups set nobackup " we use a dark background set background=dark " fuck the beeps set noerrorbells " for hidden buffers set hidden set smartindent " continue searching at top when hitting bottom set wrapscan "always show the command set showcmd " show all changes set report=0 " no the terminal is not always fast set nottyfast " use autoindent set autoindent " expand tabs set expandtab " how many spaces for indenting set shiftwidth=4 " enumerate Lines set nu " substitude tabs with » and trailing spaces with · set list listchars=tab:>·,trail:· " after 75 characters write a swap file set uc=75 " tab width set tabstop=4 " do not behave like vi, vi is dead set nocompatible " use color sheme "color ron " use the modelines commands set modeline " use 3 lines for modelines set modelines=3 " use , as mapleader variable let mapleader="," "======================== " Syntaxhiglighting "======================== let color = "true" if has("syntax") if color == "true" " This will switch colors ON so ${VIMRUNTIME}/syntax/syntax.vim else " this switches colors OFF syntax off set t_Co=0 endif endif " comment types set comments=b:#,:%,fb:-,n:),n:> fo=cqrt " force using hjkl$ " :noremap :echoerr "Use k instead!"$ " :noremap :echoerr "Use j instead!"$ " :noremap :echoerr "Use l instead!"$ ":noremap :echoerr "Use h instead!"$, " ========================================================== " Abriviations " ========================================================== " " urls iab NGOLDE http://www.ngolde.de iab google http://www.google.de iab Wklass http://www.abschlussfotos.de.vu " spelling mistakes iab packet paket iab Packet Paket iab natürlcih natürlich iab felher fehler iab atle alte iab paranoit paranoid iab Standart Standard iab herran hera iab ider oder iab alos also iab charcter character iab examlpe example iab nciht nicht iab Netwokr Network$ iab Srever Server$ iab Standart Standard$ iab standart standard$ iab SIe Sie$ iab ICh Ich$ iab cih ich$ iab shc sch$ iab amchen machen$ iab amche mache$ iab DU Du$ iab du Du$ iab DIr Dir$ iab Linx Linux$ " Jargon File iab JARGON http://www.catb.org/~esr/jargon/ " usefull for mail formatting iab sn [...] " give current date iab DATE =strftime("%a %b %d %T %Z %Y") " ============================================== " Mappings " ============================================== " use shell with ctrl-z map :shell " delete the text until start of the mail signature with ,k map k d/^-- $ " with ,a give a greeting to the person you write a mail map a G/^\* /e+1ye1G}oHallo ", map A G/^\* /e+1ye1G}oHey, " change mail subjects map sw 1G/^Subject: :s/Re:/was:/Wi ($)0Whi " delete ^M. fucking dos characters cmap rm %s///g " change the FROM: map 1G/^From: /e+1CNico Golde " search ~/.website nmap s :r!grep '' ~/.website " show trailing white spaces nmap Sws :%s/ /·/g vmap Sws :%s/ /·/g " see the top of this document map L 1G/Letzte Änderung:\s*/e+1CDATE map l 1G/Latest change:\s*/e+1CDATE " show original date of mail if the mail client from the sender sets valid " msgid's map ## 1G/^In-ReyypdWx14lD:s/^\(\d\d\d\d\)\(\d\d\)\(\d\d\)\(\d\d\)\(\d\d\)\(\d\d\)/\1-\2-\3 \4:\5:\6/ nnoremap Q gq vnoremap Q gq " show trailing spaces at the end of the lines nmap tw :%s/ *$/_/g vmap tw :%s/ *$/_/g " delete this whitespaces nmap :%s/\s\+$// vmap :s/\s\+$// " use jj instead of esc to change the mode " inoremap jj " reformat mails map :set tw-=2gqip vmap :set tw-=2gvgqgv map :set tw+=2gqip vmap :set tw+=2gvgqgv " use pon and poff instead of set no/paste map pon :set paste$ imap pon :set pastea$ map poff :set nopaste$ imap poff :set nopastea$ " convert text2html map ,h :runtime! syntax/2html.vim " FTPing with vim map fr :Nread ftp://www.ngolde.de/index.html map fw :Nwrite ftp://www.ngolde.de/index.html " ============================================ " Highlighting " ============================================ syntax match nico "Nico" highlight nico ctermbg=Red syntax match golde "Golde" highlight golde ctermbg=Red syntax match linux "Linux" highlight linux ctermfg=Green " let me know http://www.ngolde.de syntax match yacpi "Yacpi" highlight yacpi ctermfg=Yellow "vim:tw=80 et sw=4 comments=\:\"