" Dan York .vimrc tweaked for use with DocBook 4.1 " $Id: .vimrc,v 1.4 2001/07/13 10:49:33 dyork Exp $ " Used with vim 5.7 " If you come up with any additional useful mappings, please " pass them along to 'dyork@Lodestar2.com' " maps the F1 key to Esc to disable going into Help. On my " IBM ThinkPad laptop, the Esc key is above F1 and I keep " hitting F1 and (arrggghhh!!) going into help! imap " turn on syntax highlighting set syntax=on " set text width to 78 characters set tw=78 " set auto-indenting set ai " ABBREVIATIONS " some abbreviations that I was using for DocBook characters. " These have to be typed separated by whitespace and are replaced " *after* they are typed. (i.e. typing 'ems' alone will expand it, " but 'items' will not expand) I started using mappings instead of " this method. iab em1 iab em2 iab ems " MAPPINGS " Like the .vimrc file shown at http://www.vim.org/ I decided to " start all my mappings with a comma. Since I do pretty much all " my work in DocBook, I just started with the letter after the " comma for a DB tag, rather than using something like 'd' to " indicate it was a DB tag (i.e. ',dp' instead of ',p'). If you " want to use other mappings, you may want to change this. " My mappings are currently primarily for easy of entering DB " tags. I haven't yet gotten into changing existing text with mappings. " A side effect of using the comma for mappings is that when you type " a comma in vim, it will now pause and wait for input. If you just hit " the spacebar, you should see a regular old comma appear. " Note: 'imap' = a mapping for 'insert' mode of vim " All of these commands work ONLY when you are in Insert mode " will put a line return in the file. This is purely my style of " entering certain DocBook tags. You may wish to remove some. " After typing the DocBook tag, many of these macros then switch to " vim command mode, reposition the cursor to where I want it to be, " and then re-inter insert mode. You may wish to change where it ends. " This one has two p's to type in a paragraph because when it was simply " ',p' before, it precluded the use of other macros beginning with 'p' " such as ',pl' for programlisting. The two p's are fast to type. imap ,pp k$a " header and setup info imap ,dtx "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> imap ,dts imap ,bk kkk$bba imap ,ar
kkk$bba " character formatting imap ,em bba imap ,es bbla " links imap ,ul bb3la imap ,lk bb3la " lists " note that ',l2' was created solely to fit into ,il and ,ol imap ,li kk$a imap ,l2 imap ,il ,l2kkk$a imap ,ol ,l2kkk$a imap ,ve ,l2 imap ,vl ,ve " sections " I put a in here so that onsgmls will treat it as valid DB even with " nothing entered into the text. " Note that I also assign an 'id' to each section so that openjade generates " files with those ids as names. imap ,s1 kkk$bba imap ,s2 kkk$bba imap ,s3 kkk$bba imap ,se
kkk$bba imap ,ch kkk$bba " images " My mediaobject has two imagedata entries - 1 for EPS and 1 for JPG imap ,img imap ,to imap ,mo ,imgk$hiEPSj$a,imgk$hiJPGj$a,to "tables imap ,en bba imap ,tb
kk imap ,ro k$bba " Q and A sets imap ,qq k$bba imap ,qa k$bba imap ,qe O imap ,qs O imap ,qd k$bba " other objects imap ,ti bba imap ,fn bba imap ,fo imap ,pl O imap ,sb imap ,sc O imap ,no imap ,w imap ,co bhi imap ,cm bba imap ,bq
O " macro for character data imap ,cd $ba " macros for DocBook XML Slides using Norman Walsh's slides DocType imap ,fl kkk$bba " ---------------------------------------------------- " Advogato entries " Designed to help speed up entry of Advogato diaries " ---------------------------------------------------- imap ,ae

-kwwwwa imap ,aa bbla imap ,ai bba imap ,ap bba " This will reformat a paragraph to < 80 characters map g !}fmt -c " AUTOCOMMANDS " This one writes a file automatically when it loses focus "autocmd FocusLost * :w