" ======================================================================= " File: $HOME/.vimrc " Purpose: *Personal* Setup file for the editor Vim (Vi IMproved) " It contains everything which I use *personally*. " Author: Sven Guckes guckes(at)vim.org http://www.guckes.net/ " Size: ca 1000 lines with about 35KB " Latest change: Tue Jun 03 18:38:36 CEST 2008 " ======================================================================= " " ======================================================================= " Mind you, this file is only a setup file for *personal* use. " The BIG setup file which I created for *all* users ("vimrc.forall") " is available in my setup file directory: " http://www.guckes.net/setup/vimrc.forall (uncompressed) " http://www.guckes.net/setup/vimrc.forall.gz (compressed) " Enjoy! Feedback is very welcome! :-) " ======================================================================= " " ====================================== " Loading general setup files first " ====================================== " " load the general setup for myself and others: if has("unix") " Source the setup file for all users: let FILE=expand("~/.vimrc.forall") if filereadable(FILE) exe "source " . FILE endif endif " " =================== " Settings of Options " =================== " " Turn on HighLightSearching: " se hls " sometimes I need this, sometimes I dont... " " ============== " Autocommands " ============== " " When editing HTML files (aka webpages) " expand the "keywords" by characters "colon" and "slash" " so you can expand URL prefixes as "words", " eg http://vi-editor.org/ :-) au FileType html set isk+=:,/,~ " " Silly test message to check the filepattern for message files: " au BufRead .followup,.article,.letter,mutt* echo "Editing Messages\!" " " au BufCreate * set term=vt220 " au BufCreate * set term=ansi " map ''' :set term=vt220:set term=ansi " " setting initial position after reading a file into a buffer: " au BufReadPost * normal 2G10| " " ============== " Abbreviations " ============== " read in abbreviations for program names with their " latest version and their respective release dates: " source ~/.vim/program-versions " " Abbreviations for some classic long words: " Donau... is the German word for the (read in reverse) " "additional paragraph of the law regulating the pension of " widows to captains of the ship company on (the river) Danube" " (I am not making this up! ;-) iab YDD Donaudampfschifffahrtgesellschaftskapitaenwitwenrentengesetzzusatzparagraph iab YDD2 Donaudampfschifffahrtskapitänswitwenversicherungspolicenvermittlerprovisionsvorsteuerabzugsberechtigungsklausel " " New German spelling "schifffahrt", too! (Hi, Doram!) iab YTNGV Telekommunikationsnummerngebuehrenverordnung iab YTUEV Telekommunikationsüberwachungsverordnung " iab YRRAG Rinderkennzeichnungs- und \ " Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz (RkReÜAÜG) " Such words for law names can really make you MAD!! (moo!) " " would you believe government people use such words *every* day? iab ITP Informationstechnologiepolitik " " Some more weird sentences in KrautLang " using as many umlauts as possible: iab Yumlauts1 Jörg möchte fünf Frühstücksbrötchen um äußerstes Völlegefühl zu spüren. iab Yumlauts2 Äßen Löwen Möwen, zögen Möwen über Löwen rüber. iab Yumlauts3 Äße Öko-Jörg große Bärenfüße in äußerst süßer Nußölkäsesoße müßte er in ein übermäßig häßliches Güllefaß. " " and now a word with all three umlauts and the 'ß', too: iab YHRA Heizölrückstoßabdämpfung " " the Kraut's special characters iab Ykraut äöüß " " But some languages are even weirder - Welsh, for example: " YLL : The name of a town in Wales. iab YLL LLanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch " http://www.llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.co.uk " I am not making this up! :-) check it with the "host" command! " [on 2003-09-03 the IP was 195.224.126.6] " " and now something from down under: " YTauma: The name of a hill in New Zealand: iab YTauma Taumatawhakatangihangakoauauotamateaturipukakapikimaungahoronukupokaiwenuakitanatahu " " (supposedly) the longest word in the second edition of the Oxford English Dictionary: iab YNNMSVC pneumonoultramicroscopicsilicovolcanoconiosis " " Yanti: The longest proper word in the English language?! iab Yanti antidisestablishmentarianism " " Yupsidedown: This describes people from "down under" (Hi, Dean!). iab Yupsidedown umop-ap!sdn " " Ysesqui: "Sesquipedalophobia" means "fear of big words." ;-) iab Ysesqui sesquipedalophobia " " Yi18n: - yup, there really are exactly 18 " characters between the 'i' and the 'n': iab Yi18n internationalization " .123456789012345678. " " Ysuper: A nice long word from the musical "Mary Poppins". iab Ysuper supercalifragilisticexpialidocious " " " classic pangrams (which include every letter of the alphabet): " German: " iab Ya-zDE1 kaufen sie jede woche vier gute bequeme pelze [missing: 'xy' :-/] " iab Ya-zDE2 sylvia wagt quick den jux bei pforzheim " iab Ya-zDE3 bayerische jagdwitze von maxl querkopf " iab Ya-zDE4 zwei boxkaempfer jagen eva quer durch sylt " iab Ya-zDE5 falsches üben von xylophonmusik quält jeden größeren zwerg. " iab Ya-zDE6 Bei jedem klugen Wort von Sokrates rief Xanthippe zynisch: Quatsch! " iab Ya-zDE7 Zwölf große Boxkämpfer jagen Viktor quer über den Sylter Deich. " English: " iab Ya-zEN1 the quick brown fox jumps over the lazy dog " iab Ya-zEN2 The five boxing wizards jump quickly " French: " iab Ya-zFR1 voyez le brick geant que j'examine pres du wharf. " Polish: " iab Ya-zPL1 Pchn±æ w tê ³ód¼ je¿a lub o¶m skrzyñ fig. " iab Ya-zPL2 Koñ i ¿ó³w grali w ko¶ci z piêkn± æm± u ¼ród³a. " iab Ya-zPL3 Têgi koñ i ma³y ¿ó³w ¶piewali z piêkn± æm± u ¼ród³a ¿ycia. " " And here's a sentence to break some quoing levels with ticks and brackets: " "This man's house (which 's yellow) burned down." " " And now for something completely different: " I couldn't bear to bear bears over the border. " Big bears bear big bears. " " Inserting an ellipsis to indicate deleted text iab Yell [...] vmap ,ell c[...] " " some words I type often enough: iab eig eigentlich iab insb insbesondere " iab jed jedenfalls iab led lediglich iab merkw merkwuerdig iab mitt mittlerweile iab nat natuerlich iab sicherl sicherlich iab sog sogenannt iab sow sowieso iab uebr uebrigens iab viell vielleicht iab ueb ueberhaupt iab verz verzeichnis iab wahrsch wahrscheinlich " " Austrian: iab EH ehschokloar iab LG liabe griasse! iab LW leiwand " " file system words iab DIR directory iab SDIR subdirectory iab UVER unterverzeichnis iab VER verzeichnis " " typing smileys slows me down.. iab BAH :-( iab SMILE :-) iab WINK ;-) iab GNAH :-/ iab GASP :-O iab YAY \o/ iab h5 o/ \o high5! " " correcting smileys when typed " in english on a krautboard: iab Öß) :-( iab Öß= :-) iab öß= ;-) " correcting smiley with a flat nose happens " because both colon and the closing bracket " need the shift key to be pressed; so typing " a shifted minus sign results in an underscore: iab :_) :-) " " Abbreviations for English words: iab bec because iab ev eventually " Correcting those typos. [I almost never get these right. :-(] " See also: http://www.igd.fhg.de/~zach/programs/acl/ iab alos also iab aslo also iab ahcu auch iab becuase because iab bianry binary iab bianries binaries iab charcter character iab charcters characters iab exmaple example iab exmaples examples iab shoudl should iab seperate separate iab teh the iab tpyo typo iab uptodate up-to-date iab upt up-to-date " " Some frequent typos in German: iab bscihen bischen iab bracuht braucht iab doer oder iab nciht nicht " iab Dreckfuhler Druckfehler " ;-) " " See http://www.guckes.net/sig/ ! iab YDDS dash-dash-space " " Some sentences that I really use often in emails about Vim: iab YAW You are welcome! iab yaw you are welcome! iab YEV Enjoy Vim! :-) " iab cbase c-base " Often used filenames - only needed these on the command line: " see also: http://www.guckes.net/setup/ " " cab ELMALIAS ~/.elm/aliases.text " cab Erc ~/.elm/elmrc " cab Mrc ~/.muttrc " cab Src ~/.slrnrc " cab Zrc ~/.zsh/.zshrc " " ======================= " Mailing Lists (MLs) " ======================= " " Here are some addresses+names which I might add " when I am typing a message to some mailing list; " as usual, the header of the message is within " the temporary file which contains the message. " " The Vim mailing lists: " See http://www.vim.org/community.php for more info! " ab MLvim vim@vim.org (VIM Help List) " ab MLvimdev vim-dev@vim.org (VIM General Development List) " ab MLvimmac vim-mac@vim.org (VIM on MacOS Development List) " ab MLvimmb vim-multibyte@vim.org (VIM MultiByte Development List) " ab MLvimfr vim-fr@egroups.com (VIM Help List for French Users) " " More mailing lists: " ab MLmuttdev mutt-dev@mutt.org (Mutt Developer List) " ab MLmuttuser mutt-users@mutt.org (Mutt Users List) " ab MLzsh zsh-users@sunsite.auc.dk (ZShell Users List) " " " ======================= " News: newsgroup names " ======================= " " Newsgroup about "warloding" of signatures - see " also http://www.guckes.net/afw/ iab Nafw alt.fan.warlord " " a collection of fun articles on Usenet" iab Nahbou alt.humor.best-of-usenet " " The department of Central Data processing (ZEDAT): iab Nzedat bln.announce.fub.zedat.d " The department of Computer Science: iab Ncsd bln.announce.fub.cs.d " Newsgroups about text editors iab Nce comp.editors iab Ndce de.comp.editoren iab Nsmm de.comm.software.mailreader.misc " Newsgroup about "lynx": iab Nhtml comp.infosystems.www.authoring.html " Newsgroup about "elm": Elm is dead - long live Mutt! iab Nelm comp.mail.elm " Newsgroup about "pine": " When will pine have *real* threading like mutt? " iab Ncmp comp.mail.pine iab Npine comp.mail.pine " Newsgroup about "web browsers": iab Nlynx comp.infosystems.www.browsers.misc iab Nnetscape comp.infosystems.www.browsers.misc " Newsgroup about "mutt" [since 980401]: " The mail user agent that "sucks less". :-) iab Nmutt comp.mail.mutt " Newsgroup about "nn": Once the best newsreader. Still good, though. iab Nnn news.software.nn " Newsgroup about "newsreader *agents*" (netscape and slrn): iab Nnsr news.software.readers iab Ndnsr de.comm.software.newsreader " Newsgroup for "newbies". " All you ever wanted to know - but were afraid to ask. ;-) iab Nnewbie news.newusers.questions " " Usenet header lines (used when composing a post): iab UFT Followup-To: iab UMCT Mail-Copies-To: MYADDR iab UNG Newsgroups: iab URT Reply-To: MYADDR " " My phone numbers: " " home phone in Berlin: iab Yphone fon +49-30-6337.8353 " cellphone when in Austria: iab YcellAT fon +43-699-81597991 " cellphone when in Germany: iab Ycell fon +49-179-3966141 " instant messaging via ICQ: iab YICQ ICQ:38801898 " the key ID of my pgp key: iab Ypgp 57F77F09 iab YPGP 1024R/57F77F09 [1995-01-30] " My snail mail address, bus+ubahn stations: iab Ysnail Sven GuckesPariser Str. 52D-10719 Berlin iab Ybus bus 249 "Pariser Strasse"ubahn U1+U9 "Spichernstrasse" " " My addresses (Email and WWW) " makes it easy to type them without typos ;-) " ab Amails guckes(at)slrn.org " ab Amailv guckes(at)vim.org " ab Apriv sven(at)guckes.net ab MYUSERNAME guckes ab MYADDR guckes@guckes.net ab MYDOMAIN guckes.net ab MYNAME Sven Guckes ab MYY Sven Guckes ab WWWG http://www.guckes.net/ ab wwwg www.guckes.net/ " " WWW Pages base URLs " " ab HPA http://www.guckes.net/afw/ " ab HPa http://www.guckes.net/ascii/ " ab HPb http://www.guckes.net/bootlab/ " ab HPc http://www.guckes.net/calvin/ " ab HPD http://www.guckes.net/dos/ " ab HPe http://www.guckes.net/eplus/ab.faq.html " ab HPE http://www.guckes.net/elm/ " ab HPI http://www.guckes.net/irc/ " ab HPi http://www.guckes.net/ispell/ " ab HPL http://www.guckes.net/lynx/ " ab HPl http://www.guckes.net/less/ " ab HPm http://www.guckes.net/mail/ " ab HPme http://www.guckes.net/mail/edit.html " ab HPM http://www.guckes.net/mutt/ " ab HPN http://www.guckes.net/nn/ " ab HPP http://www.guckes.net/pine/ " ab HPO http://www.guckes.net/outlookexpress/ " ab HPp http://www.guckes.net/procmail/ " ab HPR http://www.guckes.net/rot13/ " ab HPr http://www.guckes.net/rtfm/ " ab HPs http://www.guckes.net/screen/ " ab HPS http://slrn.sourceforge.net/ " ab HPS2 http://www.slrn.org/ " HPov - the "original" URL of the Vi Editor Page! " ab HPov http://www.guckes.net/vi/ " ab HPv http://vi-editor.org " ab HPw http://www.guckes.net/windows/ " ab HPV http://www.vim.org/ " HPOV - the "original" URL of the Vim Home Page! " ab HPOV http://www.guckes.net/vim/ " ab HPx http://www.guckes.net/xmas/ " ab HPz http://www.guckes.net/zsh/ " ab HPZ http://www.zsh.org/ " " Pictures: ab URLbambi http://www.guckes.net/pics/calvin/bambi.gif ab URLsecret http://www.guckes.net/pics/calvin/secret.gif ab URLwhome http://www.guckes.net/pics/calvin/who_me.gif ab URLstopspam http://www.guckes.net/pics/spam/stop.jpg " " The nearest vim site for me: ab FTPFUB ftp://ftp.fu-berlin.de/ ab FTPVIM ftp://vim.ftp.fu-berlin.de/ " " Linux Events in Europe: " Braunschweig, Chemnitz, Karlsruhe, StPoelten, Stuttgart, Vienna " iab HPLTB http://braunschweiger.linuxtag.de " iab HPLTC http://www.tu-chemnitz.de/linux/tag/ " 2003 " iab HPLTC http://www.tu-chemnitz.de/linux/tag/lt6/ " 2004 " iab CH Chemnitz " iab LTC Linux-Tag Chemnitz " bis 2004 iab LTC Linux-Tage Chemnitz " iab CLT Chemnitzer Linux-Tage iab YCLT Chemnitzer Linux-Tage iab HPLTC http://chemnitzer.linux-tage.de/ iab HPCLT http://chemnitzer.linux-tage.de/ iab UCLT http://chemnitzer.linux-tage.de/2008/ " iab HPBLIT Brandenburger Linux-Infotag iab YBLIT http://www.linuxtag-brb.de/ iab YALIT Augsburger Linux Info Tag " iab HPLTM http://www.mdlug.de/index.php3/linuxtag2001/ iab HPLTM http://www.mdlug.info/linuxtag2003/ iab HPLT http://www.guckes.net/linuxtag2003/ " iab HSTP http://www.guckes.net/stpoelten/ iab HPLW http://wien.linuxwochen.at iab HPF http://infotage.pf-lug.de/ iab HPFV http://infotage.pf-lug.de/vortraege.php " " Free Summer in Graz, Austria: iab YKL Kunstlabor iab YMKL medien.KUNSTLABOR " iab HPKL http://www.kunstlabor.at/ iab HPFS http://freesummer.kunstlabor.at/ iab HPFS2 http://www.guckes.net/freesummer/ " Kunstlabor events: iab KL2NY http://ice.mur.at:8000/list.cgi iab KL2NY http://stream.kunstlabor.at:5800/khlive iab NY2KL http://80.110.99.166:8000/ " Kunstlabor services. " iab PHOTO http://www.guckes.net/pics/2004/ " got deleted in July 2005 iab CAM1 http://cam1.kunstlabor.at/ " mostly at teranga restaurant iab CAM2 http://cam2.kunstlabor.at/ iab CAM3 http://cam3.kunstlabor.at/ iab CAM4 http://cam4.kunstlabor.at/ iab KLIRC1 /server irc.kunstlabor.at/join #kunstlabor iab KLIRC2 /server irc.freenode.org/join #kunstlabor iab STREAM http://stream.kunstlabor.at:5800/khlive map \d :b diary map \t :b F/TODO " " Names of cities in Germany and Austria iab DEU Deutschland iab OES Oesterreich " iab BER Berlin iab DD Dresden iab CHE Chemnitz iab KAR Karlsruhe iab MGD Magdeburg iab STP StPoelten " " Some of these things I simply write *too* often ;-) iab BET Betriebssystem " iab FS Freie Software iab SWT SchoenesWochenendeTicket " " iab LT Linuxtag " iab LIT Linux-Tag iab alit Augsburger Linux-Infotag iab ALIT Augsburger Linux-Infotag " " Phrases. " Yanfs: Changing the Subject within a message. (Hi, Monty Python!) iab Yanfs And now for something completely different... " " Ybtdt: It's been dejavu all over again. iab Ybtdt Been there, done that, got the tshirt. " " huh i say this when i just don't understand what i read. iab Yhuh huh? (i dont understand you - please clarify!) " " Yicty: secrets are to remain secrets - especially " when they are carefully hidden in the manual. iab Yicty i could tell you - but then i'd have to kill you. iab Ywcty we could tell you - but then we'd have to kill you. " " Ykaum: "do it right - then it works!" iab Ykaum kaum macht man's richtig - geht's! " " Ypass: Standard answer to Usenet posts " with the "Subject: HELP" (hehe) iab Ypass "You are in a maze of twisty little passages, all alike." " " iab Yverdi "everyone deserves the software he uses!" iab Yverdi jeder verdient die software, die er benutzt! " " Ywttc: One more person using some text tool " (mutt/screen/slrn/vim/zsh...) iab Ywttc Welcome to the club! " " Ywyot: people who use the browser for email and news... iab Ywyot when your only tool is a hammer - every problem looks like a nail. " " " " ============================================================ " abbreviations and mappings related to Linux Events " see also: http://www.guckes.net/linuxevents/ " ============================================================ " " LinuxTag Berlin " Sa+So 30.Okt2004 map #B gg}OFcc: +BERLINUX " " LinuxTag Brandenburg " Sa 24.4.2004 map #BR gg}OFcc: +BRANDENBURG " " LinuxTag in Chemnitz " http://www.tu-chemnitz.de/linux/tag/ map #C gg}OFcc: +CHEMNITZ " " CCC Congress map #CCC gg}OFcc: +CCC " " LinuxTag in Dresden " http://www.linux-dresden.de/ map #D gg}OFcc: +DRESDEN " " GIESSEN - Practical Linux " http://www.practical-linux.de/ " Lars Stetten map #GI gg}OFcc: +GIESSEN " " GaRP - Grundschule am Ruedesheimer Platz " a primary school in Berlin using Linux " http://www.garp.in-berlin.de/ map #GG gg}OFcc: +GARP " " Graz - 2004-05-07 + 2004-05-08 map #GR gg}OFcc: +GRAZ " " LinuxTag Karlsruhe " 2003-07-10 -- 2003-07-13 " 2002-06-06 -- 2002-06-09 map #K gg}OFcc: +KARLSRUHE " " OpenChaos Koeln " 2003-10-30 " map #K gg}OFcc: +KOELN " " LinuxTag Karlsruhe " 2004-06-23 -- 2004-06-26 map #L gg}OFcc: +LINUXTAG map ## gg}OFcc: +LINUXTAG " " Linux Camp 2002 " http://www.linux-camp-2002.de " 2002-05-17 - 2002-05-20 map #LC gg}OFcc: +LUGCAMP " " Linux Tag Magdeburg " 2003-04-05 http://www.mdlug.info/linuxtag2003/ " 2002-05-25 http://www.mdlug.de/index.php/linuxtag2002/main.inc?menu=0| map #M gg}OFcc: +MAGDEBURG " " Linux InfoTage (Berlin) " http://www.linuxinfotage.de " 2003-06-28 + 2003-06-29 " 2002-09-25 + 2002-09-26 " 2001-09-15 + 2001-09-16 map #LIT gg}OFcc: +INFOTAGE iab YLIT Linux Infotage iab ULIT www.linuxinfotage.de " " orkut.com map #O gg}OFcc: +ORKUT " " 2004-01-18... Key Signing map #P gg}OFcc: +PGPSIGNING " " Utrecht " 2003-12-12 map#U gg}OFcc: +UTRECHT " " LinuxWochen Wien " 2003-06-05 -- 2003-06-07 Thu-Sat " 2002-06-28 -- 2002-06-30 " http://www.linuxwochen.at map #W gg}OFcc: +LINUXWOCHEN iab TM Tabaksmuseum iab MQ Museumsquartier " iab smsfranz 4369919420047@max.mail.at " iab smscandy 436765108351@max.mail.at " www.izone.at & www.one.at & www.a1.net " " ============================================================ " abbreviations and mappings related to Projects " ============================================================ " " ELVIS - vi clone, Debian package " mailing list: " http://groups.yahoo.com/group/elvis-editor/ map #E gg}OFcc: +ELVIS " " Linux Camp Flensburg " 2004-05-20 -- 2004-05-23 map #F gg}OFcc: +FLENSBURG " " FLI4L - installation map #FF gg}OFcc: +FLI4L " " Ganesha's Project " Computer project in Nepal " http://www.ganeshas-project.org map #GP gg}OFcc: +GANESHA " iab UGP http://www.ganeshas-project.org " iab IGP info@ganeshas-project.org " iab SBSS Shree Bachhauli Secondary School " " Kurbel Kino " http://www.ufa-kurbel.de " cinema in berlin which had to close down - " maybe it will be reopened? map #KK gg}OFcc: +KURBEL " " OpenWebSchool project " http://www.openwebschool.de " virtual lessons of all subjects " iab YOWS OpenWebSchool " map #O gg}OFcc: +OWS " " TADLO " www.tadlo.net " Computer project in Laos map #T gg}OFcc: +TADLO iab Utadlo http://www.tadlo.net " " ============== " Colorization " ============== " " Colorize some default highlight groups " see ":help highlight-default" " " Comments: Colorizing the "comments" (see ":help comments"). " cyan on white does not look good on a black background.. hi comment ctermfg=cyan ctermbg=black " hi comment ctermfg=cyan ctermbg=7 " " hi Cursor " hi Directory " hi ErrorMsg " hi FoldColumn " hi Folded " hi IncSearch " " LineNr: Colorize the line numbers (displayed with "set number"). " Turn off default underlining of line numbers: hi LineNr term=NONE cterm=NONE " " hi ModeMsg " hi MoreMsg " " coloring "nontext", ie TABs, trailing spaces, end-of-lines, " and the "tilde lines" representing lines after end-of-buffer. hi NonText term=NONE cterm=NONE ctermfg=blue ctermbg=black " " Normal text: Use white on black. " hi normal ctermfg=white ctermbg=black guifg=white guibg=black hi normal ctermfg=grey ctermbg=black guifg=grey guibg=black " Oops - this overrides the colors for the status line - DANG! " " hi Question " " Search: Coloring "search matches". Use white on red. hi search ctermfg=white ctermbg=red guifg=white guibg=red " " hi SpecialKey " " statusline: coloring the status line -> is not possible :-( " hi StatusLine term=NONE cterm=NONE ctermfg=yellow ctermbg=red " hi StatusLineNC term=NONE cterm=NONE ctermfg=black ctermbg=white " " hi Title " hi VertSplit " hi Visual " hi VisualNOS " hi WarningMsg " hi WildMenu " " Other Groups: " " Normal: Coloring the text with a default color. hi normal term=NONE " " ============== " Mappings " ============== " " Attribution Fixing: from "Last, First" to "First Last": map ,ATT gg}jWdWWPX " " ============================================================ " Options() - used to display some important option values " within the status line (see below at "set statusline". " ============================================================ " " Statusline - Vim version, buffer number, " stati modified+read-only+help (MRH), " the filename, textwidth, and then " the ruler and percentage at the end. " set statusline=Vim-%{Version()}\ [%02n]\ %(%M%R%H%)\ %F\ %=<%l,%c%V>\ %P set statusline=Vim-%{Version()}\ [%02n]\ %(%M%R%H%)\ %F\ %=tw=%{&tw}\ <%l,%c%V>\ %P " " Damien WYART [000329]: " set statusline=%<%f%=\ [%1*%M%*%n%R%H]\ \ %-25(%3l,%c%03V\ \ %P\ (%L)%)%12o'%03b' " hi User1 term=inverse,bold cterm=inverse,bold ctermfg=red " fu! Options() " let opt="Opt:" let opt="" " autoindent " if &ai| let opt=opt." ai" |else|let opt=opt." noai" |endif if &ai| let opt=opt." ai" |endif " expandtab " if &et| let opt=opt." et" |else|let opt=opt." noet" |endif if &et| let opt=opt." et" |endif " hlsearch " if &hls| let opt=opt." hls" |else|let opt=opt." noet" |endif if &hls| let opt=opt." hls" |endif " paste " if &paste|let opt=opt." paste"|else|let opt=opt." nopaste"|endif if &paste|let opt=opt." paste"|endif " shiftwidth if &shiftwidth!=8|let opt=opt." sw=".&shiftwidth|endif " textwidth - show always! let opt=opt." tw=".&tw " let opt=opt."\[".&lines.",".&columns."\]" return opt endf " " ============================================================ " Colorizing that status lines! Whee! :-) " ============================================================ " " Statusline without colors and display of options - " but with percentage at end: " set statusline=Vim-%{Version()} [%02n]\ %(%M%R%H%)\ %F\ %=<%l,%c%V>\ %P " " set statusline=Vim-%{Version()}\ %{getcwd()}\ \ %1*[%02n]%*\ %(%M%R%H%)\ %2*%F%*\ %=%{Options()}\ %3*<%l,%c%V>%* " Text between "%{" and "%}" is being evaluated and thus suited for functions. " Here I will use the function "Options()" as defined below to show the " values of some (local) options.. " The strings "%N*" unto "%*" correspond to the highlight group "UserN": " User1: color for buffer number " hi User1 cterm=NONE ctermfg=red ctermbg=white guifg=red guibg=white " User2: color for filename " hi User2 cterm=NONE ctermfg=green ctermbg=white guifg=green guibg=white " User3: color for position " hi User3 cterm=NONE ctermfg=blue ctermbg=white guifg=blue guibg=white " fu! Version() return version endf " " ===================================================== " KILL QUOTED SIGNATURE " ===================================================== " " when mutt starts up the editor then it will give it " a temporary filename of "/tmp/mutt*". " when the temporary file gets read into a buffer " then we'll let vim issue a sequence of commands. " au BufRead /tmp/mutt* normal /^> -- $ " " kill quoted signature " detect signature by sigdashes line ("-- ") " and then delete unto the next non-empty line: " au BufRead /tmp/mutt* normal :g/^> -- $/,/^$/-1d^M/^$^M^L " au BufRead /tmp/mutt* normal :g/^> -- $/,/^$/-1d/^$ " au BufRead /tmp/mutt* normal :g/^> -- $/,/^$/-1d " au BufRead /tmp/mutt* normal /^> -- $dG " au BufRead /tmp/mutt* normal :/^> -- $d} " au BufRead /tmp/mutt* normal /^> -- $ " " "from quoted sigdashes line unto last line - delete!" " au BufRead /tmp/mutt* :/^> -- $/,$d " " this avoid the prompt "N fewer lines" " by expanding the command line height to two lines: " au BufRead /tmp/mutt* set ch=2|/^> -- $/,$d " " problem: text after the signature gets deleted, too. " normally there should be no text after the signature, but.. " you probably know that people do this, anyway. *sigh* " au BufRead /tmp/mutt* /^> -- $/,$d " " ============================================================ " Repairing Mailbox Folders " ============================================================ " a pseudo "From_" line for files in "mailbox" format: iab Mfrom From guckes@guckes.net Thu Apr 06 12:07:00 1967 " " a pseudo "From_" line for files in "mailbox" format with current " date+time: iab YFROM_ From calendar@guckes.net =strftime("%a %b %d %T %Y") " example: " From calendar@guckes.net Wed Oct 24 16:25:31 2007 " Sometimes I need to add this line to a mailbox file " which is missing such a line to separate messages. " " 2002-11-04, 2003-10-01, 2003-10-21: insert a Message-ID header: " iab myMID Message-ID: <=strftime("%Y%m%d%H%M%S").guckes@=hostname().guckes.net> " Example: Message-ID: <20031021001122.guckes@ritz.guckes.net> " " iab myMID Message-ID: <=strftime("%Y%m%d%H%M%S").guckes@home.guckes.net> " Example: Message-ID: <20031021001122.guckes@home.guckes.net> " iab myMID Message-ID: <=strftime("%Y-%m-%dT%H-%M-%S")@guckes.net> " Example: Message-ID: <2003-10-21T00-11-22@guckes.net> " " ============================================================ " cryptography fun: " ============================================================ " simple rotation of the alphabet by *one* letter: map #c yyp!!tr a-z b-za vmap #c !tr a-z b-za " " F2 shift left map !!tr a-zA-Z za-yZA-Ygv vmap !tr a-zA-Z za-yZA-Ygv " map OQ !!tr a-zA-Z za-yZA-Ygv vmap OQ !tr a-zA-Z za-yZA-Ygv " F3 shift right map !!tr a-zA-Z b-zaB-ZAgv vmap !tr a-zA-Z b-zaB-ZAgv " map !!tr a-zA-Z b-zaB-ZAgv vmap !tr a-zA-Z b-zaB-ZAgv " " shifting the letters on the keyboard rows: " the keyboard: rotated keyboard: " qwertyuiop -> p qwertyuio " asdfghjkl -> l asdfghjk " zxcvbnm -> m zxcvbn " in qwertyuiopasdfghjklzxcvbnm " out pqwertyuiolasdfghjkmzxcvbn " map #c !!tr qwertyuiopasdfghjklzxcvbnm pqwertyuiolasdfghjkmzxcvbn " " " ============================================================ " Some useful URLs: " ============================================================ " " Google Search for WORD1 and WORD2: iab GOOGLE http://www.google.com/search?q=WORD1+WORD2 " Google Groups - citing a Message-ID: iab GMID http://groups.google.de/groups?selm=MID " Google Image Search iab IMAGES http://images.google.com/images?q=WORD " posts with "guckes" - but not from myself iab SDG http://groups.google.com/groups?q=guckes+-author%3Aguckes " the jargon file iab JARGON http://www.catb.org/~esr/jargon/ " " text interface for searches on altavista: ab URLaltavista http://www.altavista.de/textonly.html ab URLftpsearch http://ftpsearch.lycos.com/?form=advanced ab URLrpmfind http://rpmfind.net ab URLslashdot http://slashdot.org ab URLfreshmeat http://freshmeat.net " " ============================================================ " emphasize/quote previous word: " ============================================================ imap ,** B*E* imap ,"" B"E" imap ,// B/E/ " without the command prefix you'll be " asking for trouble in some situations. " this one puts angle brackets around words - " useful for email addresses: imap ,>> B<E> " 2005-11-17: " same idea, but here we'll use an abbreviation " to add the emphasis/quote to the previous word. " this inserts an extra asterisk first before it " adds the emphasis around the previous word - " and then deletes the whitespace unto " the extra asterisk before continuing. " iab ** *B*Ea*cf* " iab "" *B"Ea"cf* " iab // *B/Ea/cf* " example: " one ** -> *one* " two "" -> "two" " ten // -> /ten/ " " ================================================= " " the following is listed down here " as " list & listchars set list listchars=tab:»·,trail:· " set list listchars=tab:¯ú,trail:ú " TN3270 does not show high-bit characters: " set listchars=tab:>.,trail:o " " ================================================= " TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST " ================================================= " " hi groupname ctermfg=blue ctermbg=black guifg=blue guibg=black hi normal ctermfg=white ctermbg=black guifg=white guibg=black hi mailQuoted1 ctermfg=green ctermbg=black guifg=blue guibg=black hi mailQuoted2 ctermfg=blue ctermbg=black guifg=blue guibg=black hi link mailQuoted3 mailQuoted1 hi link mailQuoted4 mailQuoted2 hi link mailQuoted5 mailQuoted1 hi link mailQuoted6 mailQuoted2 " " adding a "%pause" line with a function key " (i need this when editing a talk " which i gave using magicpoint) " map [24~ O%pause " " visual mode: 'p' to replace current text " with previous copied/deleted text: [010126] vmap p d"0P " " weed search stats of atomz.com: " map #ws vip:s/^ \+- //vip:s/ for "\(\w\+\)"/ \1/ " " 2003-09-22 " fixing format-flowed text when quoted map ,ff /^$/,$g/ $/normal gJdw " " 2003-10-01 " map ;f 1G/From:.*C " map ;c 1G/From:.*C " map ;d 1G/From:.*C " map ;h 1G/From:.*C map ;j 1G/From:.*C map ;m 1G/From:.*C " map ;k 1G/From:.*C " map ;l 1G/From:.*C map ;p 1G/From:.*C " map ;P 1G/From:.*C " map ;t 1G/From:.*C map ;u 1G/From: f< ct@usenet-=strftime("%Y-%m-%d") " " 2003-10-05 " iab WGN webpage-X@guckes.netFXs " " 2003-10-10 " translating text - with the help of color " au BufRead *.trans.* ... " 2003-10-15 TEST: " au FileType mail :/^$ " au FileReadPost mail :/^$ " au BufRead mail :/^$ " au BufReadPost mail :/^$ au BufEnter mail :/^$ " key signing.. 2004-01-25 " map :se tw=901G/SubA - key 0x X signed - signature attachedFXs " why this damn keyboard issue a different " character sequence on a shift-return? map OM " hi TheNullChar ctermfg=red ctermbg=black match TheNullChar // hi ControlChars ctermfg=red ctermbg=black match ControlChars /[[:cntrl:]]/ " hi HighBitChars ctermfg=yellow ctermbg=red " match HighBitChars /[-]/ " match HighBitChars /[€-ÿ]/ " hi Hauptworte ctermfg=green ctermbg=black " match Hauptworte /[A-ZÄÖÜ]\k\+/ " " 2004-02-18: " escape from insert mode with "jj" on a keyboard " where the eascpe key is pretty unaccesible. " imap jj " " i say this way too often! iab cmmi configure && make && make install " " who needs DELs, anyway? cmap   imap   " " repeat the macro stored in register 'a' with F12: map @a " this has become quite indispensable! " " faces typed on a krautboard " with an english/us layout: iab >/( :-) iab /& :-/ " iab Yhmm firathpxrf iab Ubitf http://freebitflows.t0.or.at/ iab UPH unperfekthaus " " " 2005-01-12, 2005-02-03, 2005-04-30 " trigger expansion from the dictionaries " imap " too annoying. i need the tab key as tab. period. " " 2005-02-03 Lax'sche Umlaut-Paragraphenoperation " this gives a useful meaning " to umlauts in command mode: " map ö { " map Ö {O " map ä } " map Ä }O " " 2005-02-18: read from or write to /tmp/screen-exchange map ,rt :r /tmp/screen-exchange vmap ,rt :w! /tmp/screen-exchange " " " ============================================================ " fixing citation and quoting for emails " ============================================================ " fixing comb quoting (for mails from esther) map ,comb :g/^> > .*\n^> [^>]/j:g/^> > .*>/s/> \([^>]*\)$/\1/ " " 2005-02-05: Erich's KMail cites text with "// " *sigh* map ,erich :.,$s,^> //,> >, " " 2005-02-08: why use utf8 when most people cant read it? map ,utf :%!sed -f ~/.P/sed/scripts/UTF8toUmlauts.sed " " 2005-03-03: " extend the current line with spaces up to the " next non-whitespace character of the line above. " imap ,, kvWhyjop:s/./ /gkgJ$s " example: " before: " foo bar baz " blubb|<-cursor " after: " foo bar baz " blubb |<-cursor " " 2005-03-10 coloring whitespace, " ie trailing spaces and tabs: highlight TrailSpace cterm=inverse ctermfg=magenta syn match TrailSpace / *$/ highlight Tabulators cterm=inverse ctermfg=yellow syn match Tabulators /\t/ " " 2005-04-27 iab WIKI http://www.linuxwiki.de/LugBerlin " 2005-05-20, 2006-06-06 iab PHOTOS http://www.guckes.net/pics.2006.06-06/ " 2006-05-11 iab KAL http://www.guckes.net/cal/linux.txt " " 2005-05-03 " i don't use i_CTRL-A or i_CTRL-@ (control-space) " to insert previously inserted text. i prefer to " use these to jump to the first non-whitespace. imap I imap I " " 2005-06-03, 2006-06-08: "mailman repair" " map _mmr :g/^From.* at /s, at ,@, " map _mmr :g/^From .* at .*200[0-9]$/s, at ,@, " in all From: and From_ lines replace "_at_" with '@': map _mmr1 :g/^From[: ].* at /s: at :@: " insert a new line before each From_ line: map _mmr2 :g/^From .*@.* 200[0-9]$/s:^From :\n&: " " 2005-06-10 " set encoding=utf-8 " " 2005-06-21 " windows lusers seem to like these mappings: " nmap " nmap " nmap " nmap " " 2005-06-29 von Julius Plenz " substitute the less-than and greater-than characters " with their HTML equivalents in the current line: " vmap ,,< :s/gv:s/>/\>/g " " 2005-07-12 " temporary editing of the webpages for the Pforzheim event iab YPF company/group, docs, email, homepage, place. " " 2005-08-12, 2005-08-28 " align alias entries in the mutt alias file: map ,fix 0WWWgeldw9i25\|dw$F49\|dw " " 2005-08-24 " use a different viminfo file when writing emails au BufNewFile,BufRead */postpone/*,muttng-* set viminfo=\"200,%,'200,/100,:100,@100,f1,h,n~/.vim/viminfo " " 2005-11-17 " word -> *word* map ** viw`>a*` " " 2006-05-02 " background color of completion popup menu " hi pmenu ctermbg=blue " set completeopt=menuone " set completeopt=menu " " 2006-07-23 test... set fileencoding="iso-8859-1:utf-8" " " 2006-10-26 fadenkreuz an/aus map :set cul! cuc! " " 2006-10-27 blue background for current line " hi cursorline term=none ctermbg=blue " hi cursorcolumn term=none ctermbg=red " " 2006-11-08 " automatically turn on/off highlighting of cursor/column color " au InsertEnter * set nocuc cul " au InsertLeave * set nocuc cul " " 2006-11-10, 2006-12-29 " use a blue line for insert mode - and a red line for command mode " au InsertEnter * set nocuc cul | hi cursorline term=underline cterm=underline ctermbg=blue " au InsertLeave * set nocuc cul | hi cursorline term=underline cterm=underline ctermbg=blue " 2007-04-24: " au InsertEnter * set nocuc cul | hi cursorline term=underline cterm=underline ctermbg=red " au InsertLeave * set nocuc cul | hi cursorline term=underline cterm=underline ctermbg=red " " just an example within a workshop :-) " iab Ygroet groetjes uit leiden.nl " " 2006-12-06 " copy a backup of the current file to a repository: " map ,, :!scp -p % guckes@guckes.net:.P/backup/ " " 2006-12-12 got a bit tired of writing up this header iab Ybahn date: weekday dd.mm.yyyydep .arr .who: 1 adult, BahnCard50 for 2.Klasse " " 2007-02-02 " the ö character on krautboards is located " where the colon is on us keyboards. " therefore i sometimes type "öw" for ":w" " when trying to save the changes. " so instead of fighting that typo " i'll make "öw" a mapping for ":w": " map öw :w " this is more or less solved " by mapping ö to : right away. " " 2007-03-17 " the default color fo emailadreses is blue on black - " too dark to see on some terminals. gotta change that! hi mailemail ctermfg=cyan " " new defaults: set ai et ts=4 " " 2007-05-05 " i almost never use "minus" key to go back one line - " so i might as well use it to initiate searches " as the German keyboard has its minus key " where the US keyboard has its slash (/). map - / " " 2007-05-09 " a quick way to save: map ,, :w imap ,, :w " " 2007-06-05 " the umlaut ö is not mapped in command mode - " so it might take the function of the colon! map ö : map Ö : " " 2007-06-27 " i hardly ever use the Y command - " so my now-and-then typo for ZZ " could be fixed by a mapping: map YY ZZ " " 2007-08-24 FrOSCon iab FROSCON FrOSCon iab STA St.Augustin iab frpics http://wiki.froscon.de/wiki/Links#Pics " " 2007-11-26 " the umlaut ü is not mapped in command mode - " on US keyboards this key has the left brace on it. " so i will use it as such - and use its upper case " counterpart for the other brace. these commands move the " cursor before and after the current paragraph, respectivly. map ü { map Ü } " " 2008-02-05 iab ospcode \begin{ospcode}\end{ospcode} map \\ {o\begin{ospcode}}O\end{ospcode} " map ,manfred :%s,u\.,und,g " " 2008-03-05 iab YFLOSS Free/Libre Open Source Software " 2008-09-10 " iab YFSCONS Free Software CONference Scandinavia (FSCONS) 2007 iab YFSCONS Free Society Conference and Nordic Summit " 2008-04-09 iab Y12 eins zwei drei vier fuenf sechs sieben acht neun zehn elf zwoelf " 2008-05-10 au FileType tex source ~/.vim/zshbuch.vim au FileType plaintex source ~/.vim/zshbuch.vim " ============================================================ " NEW stuff *before* this line! " ============================================================ " " ============================================================ " mappings for Sebastian "blindfish" Andres " ============================================================ " although "wrap" has been set, navigation with arrow keys " do not jump linewise on the screen but linewise within the buffer. " make down+up arrows jump by a screenline using gj and gk commands: " map gj " map gk " buffer wipeout of the current buffer " map :bw " ============================================================ " Final words... " ============================================================ " The last line is allowed to be a "modeline" with my setup. " It gives vim commands for setting variable values that " are specific for editing this file. Used mostly for " setting the textwidth (tw) and the "shiftwidth" (sw). " Note that the colon within the value of "comments" " needs to be escaped with a backslash! " vim: set tw=70 et sw=4 comments=\:\": THPXRF: EOF