"VIM configuration file "by Erik Scharwaechter syntax on "syntax highlighting filetype plugin on "filetype detection set number "line numbers set list "show special characters set ignorecase "ignore case when searching set wildmenu "fancy tab completion set tabstop=8 "tabstop every 8 characters set cindent "autoindent on functions set copyindent "copy indention method set preserveindent "preserve previous idention set shiftwidth=8 "shift by 8 characters set smarttab "tab smartly :) set background=dark "brighter colors set spelllang=de,en "german and english set pastetoggle= set enc=utf-8 set tenc=utf-8 set fenc=utf-8 set spellfile=/home/erik/.vim/de.add "user dictionary set printoptions=paper:A4,number:y,syntax:y,duplex:off "printing options set listchars=tab:>-,trail:_,extends:>,precedes:< "special characters set grepprg=grep\ -nH\ $* "grep sould always generate file names (for LaTex-Suite) "TagList settings let Tlist_Inc_Winwidth=0 "don't expand window let Tlist_Exit_OnlyWindow=1 "close if none but the TagList window is open "colors hi PreProc ctermfg=1 term=bold "spelling errors ab ihc ich ab Ihc Ich ab nciht nicht ab auhc auch ab acuh auch "C/C++ ab DEF #define ab IFN #ifndef ab INC #include ab STD using namespace std; ab STRING #include ab VECTOR #include ab QUEUE #include ab IOSTREAM #include ab FSTREAM #include ab SSTREAM #include ab CERRNO #include ab CSTDLIB #include ab CSTDIO #include ab STDLIBH #include ab UNISTDH #include ab STDIOH #include ab STRINGH #include ab MAINVOID int main(void) {} ab MAINARG int main(int argc, char *argv[]) {} ab LINE1 //_________________________________________________________________________ ab LINE2 =========================================================================== "abbreviations ab XHTML ab EMAIL erik@diozaka.org ab HOMEPAGE http://diozaka.org ab DATE1 =strftime("%F") ab DATE2 =strftime("%d.%m.%y") ab DATE3 =strftime("%a, %d %b %Y %H:%M:%S %z") ab --~~~~ -- Erik Scharwächter , =strftime("%a, %d %b %Y %H:%M:%S %z") "convert German umlauts into their HTML equivalent function Umlauts2HTML() %s/Ä/\Ä/Ige %s/ä/\ä/Ige %s/Ü/\Ü/Ige %s/ü/\ü/Ige %s/Ö/\Ö/Ige %s/ö/\ö/Ige %s/ß/\ß/Ige %s/€/\€/Ige %s/„/\„/Ige %s/“/\“/Ige %s/–/\–/Ige endfunction "convert mixed iso8859-15/cp1252 quoted-printable format to German umlauts function QP2Umlauts() %s/=DF/ß/Ige %s/=FC/ü/Ige %s/=DC/Ü/Ige %s/=F6/ö/Ige %s/=D6/Ö/Ige %s/=E4/ä/Ige %s/=C4/Ä/Ige %s/=A4/€/Ige %s/=84/„/Ige %s/=93/“/Ige %s/=AC\n//Ige %s/=\n//Ige %s/=3D/=/Ige %s/=20/ /Ige endfunction "comment out code map :s/^/\/\// map :s/^/#/ map O#if 0 map o#endif "in insert mode, too imap i imap i imap i imap i "misc keys map :set invpaste:echo "Paste Mode: " . strpart("OffOn", 3 * &paste, 3) map :set invspell:echo "Spell Check: " . strpart("OffOn", 3 * &spell, 3) map :TlistToggle map :set invnumber map yy p map :call Umlauts2HTML() map :call QP2Umlauts() map :ascii "mail settings augroup mail au! "don't show line numbers au FileType mail set nonu "break line after 72 characters au FileType mail set tw=72 "no indention au FileType mail set noai au FileType mail set nocin au FileType mail set nosi "spell check au FileType mail set spell augroup END "transparent editing of gpg encrypted files. "by Wouter Hanegraaff augroup encrypted au! "make sure nothing is written to ~/.viminfo au BufReadPre,FileReadPre *.gpg set viminfo= "we don't want a swap file au BufReadPre,FileReadPre *.gpg set noswapfile "switch to binary mode to read the encrypted file au BufReadPre,FileReadPre *.gpg set bin au BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2 au BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt 2> /dev/null "switch to normal mode for editing au BufReadPost,FileReadPost *.gpg set nobin au BufReadPost,FileReadPost *.gpg let &ch = ch_save|unlet ch_save au BufReadPost,FileReadPost *.gpg execute ":doau BufReadPost " . expand("%:r") "convert all text to encrypted text before writing au BufWritePre,FileWritePre *.gpg '[,']!gpg --default-recipient-self -ae 2>/dev/null "undo the encryption after the file has been written. au BufWritePost,FileWritePost *.gpg u augroup END