" HTML.vim - Macros, menus, and autocommands for html mode " " OVERVIEW " This file has three parts: " SECTION 1: Setup of menus and associated macros " SECTION 2: Setup of macros unassociated with menus " SECTION 3: Additional autocommands " " My main interest here was creating some syntax specific menus (starting " with HTML) for gvim. Besides helping the novice, the menus are a quick " way to view what some of the macros are assigned to. Macros and keyboard " mappings are only active in buffers editing HTML files. Two main menus " are created - one for HTML tags (with submenus), and another for tools. " The tools menu can be configured to call some validations tools, for " example - TODO. " " Originally, I was using Alt-Key sequences for my bindings (e.g. " was bound to the insert comment macro). I quickly ran out of letters, " so I think the ;xx plan works better. " " I also fully specified mappings and menus for each of the 4 modes: " normal, visual, insert, and command. This might be overkill, but I " found it useful to have minor differences in each of the macros. The " utility of command mode mappings is particularly questionalble. " " I also added an autocommand to read a user's HTML template file when " editing a nonexistant html file. Also, when writing the buffer, a " BufWritePost autocommand calls an open netscape to view the results. " See notes on this below. " " BUGS, SUGGESTIONS, and COPYRIGHT " " These macros may be freely copied and modified. If you find bugs, or " if have some suggestions, or if you find them useful, I'd appreciate " hearing about it. " " T Scott Urban " urban@unix.mauigateway.com " " CREDITS " I took a lot of these macros from Doug _____ (drenze@avalon.net). " I found his work at http://www.grafnetix.com/~laurent/vim/html.mac " with some modifications by Ives Aerts (ives@sonytel.be). " " " " " SECTION 1: Setup menus and associated mapped keyboard shortcuts " "" Menu HTML Tags " """ Comment: " normal new comment on previous line " visual wrap visual selection in comment " insert insert comment at cursor position if has("gui") nmenu HTML\ Tags.Comment\ \ \ \ \ ;cm O2bcw vmenu HTML\ Tags.Comment\ \ \ \ \ ;cm `>a -->` imenu HTML\ Tags.Comment\ \ \ \ \ ;cm 2bcw endif nmap ;cm Obbcw vmap ;cm `>a -->` imap ;cm 2bcw " """ Name Anchor: " normal creates name anchor on previous line " visual wrap name anchor around current visual selection " insert insert name anchor at cursor position if has("gui") nmenu HTML\ Tags.Name\ Anchor\ ;an O2bcw vmenu HTML\ Tags.Name\ Anchor\ ;an `>a">`2bcw endif nmap ;an O2bcw vmap ;an `>a">`2bcw " """ Href Anchor: " normal creates href anchor on previous line " visual wraps href anchor around current visual selection " insert inserts href anchor at cursor position if has("gui") nmenu HTML\ Tags.Href\ Anchor\ ;ah OTAG5bcw vmenu HTML\ Tags.Href\ Anchor\ ;ah `>a`2bcw imenu HTML\ Tags.Href\ Anchor\ ;ah TAG5bcw endif nmap ;ah OTAG5bcw vmap ;ah `>a`2bcw imap ;ah TAG5bcw " """ Image: " normal creates image on previous line " visual creates image around current visual selection ?? " insert inserts image at cursor position " " if you don't like the alt tag, remove it. Just trying to " enforce good style ;> if has("gui") nmenu HTML\ Tags.Image\ \ \ \ \ \ \ ;im OIMAGE6bcw vmenu HTML\ Tags.Image\ \ \ \ \ \ \ ;im `>a" alt="IMAGE">`6bcw endif nmap ;im OIMAGE6bcw vmap ;im `>a" alt="IMAGE">`6bcw " """ Break: " normal creates break on previous line " visual creates break before selection " insert inserts break at cursor if has("gui") nmenu HTML\ Tags.Break\ \ \ \ \ \ \ ;br O
vmenu HTML\ Tags.Break\ \ \ \ \ \ \ ;br ` imenu HTML\ Tags.Break\ \ \ \ \ \ \ ;br
endif nmap ;br O
vmap ;br ` imap ;br
" """ Horizontal Rule: " normal creates rule on previous line " visual inserts rule before selection " insert inserts rule at cursor if has("gui") nmenu HTML\ Tags.Rule\ \ \ \ \ \ \ \ ;hr O
vmenu HTML\ Tags.Rule\ \ \ \ \ \ \ \ ;hr ` imenu HTML\ Tags.Rule\ \ \ \ \ \ \ \ ;hr
endif nmap ;hr O
vmap ;hr ` imap ;hr
" """ Headings Sub-Menu " normal creates selected heading on previous line " visual creates selected heading around visual selection " insert inserts selected heading at cursor position " """" H1 Heading if has("gui") nmenu HTML\ Tags.Headings.H1\ \ ;h1 O

HEADING

3bcw vmenu HTML\ Tags.Headings.H1\ \ ;h1 `>a`l imenu HTML\ Tags.Headings.H1\ \ ;h1

HEADING

3bcw endif nmap ;h1 O

HEADING

3bcw vmap ;h1 `>a`l imap ;h1

HEADING

3bcw " """" H2 Heading if has("gui") nmenu HTML\ Tags.Headings.H2\ \ ;h2 O

HEADING

3bcw vmenu HTML\ Tags.Headings.H2\ \ ;h2 `>a`l imenu HTML\ Tags.Headings.H2\ \ ;h2

HEADING

3bcw endif nmap ;h2 O

HEADING

3bcw vmap ;h2 `>a`l imap ;h2

HEADING

3bcw " """" H3 Heading if has("gui") nmenu HTML\ Tags.Headings.H3\ \ ;h3 O

HEADING

3bcw vmenu HTML\ Tags.Headings.H3\ \ ;h3 `>a`l imenu HTML\ Tags.Headings.H3\ \ ;h3

HEADING

3bcw endif nmap ;h3 O

HEADING

3bcw vmap ;h3 `>a`l imap ;h3

HEADING

3bcw " """" H4 Heading if has("gui") nmenu HTML\ Tags.Headings.H4\ \ ;h4 O

HEADING

3bcw vmenu HTML\ Tags.Headings.H4\ \ ;h4 `>a`l imenu HTML\ Tags.Headings.H4\ \ ;h4

HEADING

3bcw endif nmap ;h4 O

HEADING

3bcw vmap ;h4 `>a`l imap ;h4

HEADING

3bcw " """" H5 Heading if has("gui") nmenu HTML\ Tags.Headings.H5\ \ ;h5 O
HEADING
3bcw vmenu HTML\ Tags.Headings.H5\ \ ;h5 `>a`l imenu HTML\ Tags.Headings.H5\ \ ;h5
HEADING
3bcw endif nmap ;h5 O
HEADING
3bcw vmap ;h5 `>a`l imap ;h5
HEADING
3bcw " """" H6 Heading if has("gui") nmenu HTML\ Tags.Headings.H6\ \ ;h6 O
HEADING
3bcw vmenu HTML\ Tags.Headings.H6\ \ ;h6 `>a`l imenu HTML\ Tags.Headings.H6\ \ ;h6
HEADING
3bcw endif nmap ;h6 O
HEADING
3bcw vmap ;h6 `>a`l imap ;h6
HEADING
3bcw " """ Format: " normal creates selected format on previous line " visual creates selected format around visual selection " insert creates selected format at cursor position " " Address format if has("gui") nmenu HTML\ Tags.Formats.Address\ \ \ \ \ ;ad O
TEXT
3bcw vmenu HTML\ Tags.Formats.Address\ \ \ \ \ ;ad `>a`l imenu HTML\ Tags.Formats.Address\ \ \ \ \ ;ad
TEXT
3bcw endif nmap ;ad O
TEXT
3bcw vmap ;ad `>a`l imap ;ad
TEXT
3bcw " " Bold format if has("gui") nmenu HTML\ Tags.Formats.Bold\ \ \ \ \ \ \ \ ;bo OTEXT3bcw vmenu HTML\ Tags.Formats.Bold\ \ \ \ \ \ \ \ ;bo `>a`l imenu HTML\ Tags.Formats.Bold\ \ \ \ \ \ \ \ ;bo TEXT3bcw endif nmap ;bo OTEXT3bcw vmap ;bo `>a`l imap ;bo TEXT3bcw " " Big format if has("gui") nmenu HTML\ Tags.Formats.Bigger\ \ \ \ \ \ ;bi OTEXT3bcw vmenu HTML\ Tags.Formats.Bigger\ \ \ \ \ \ ;bi `>a`l imenu HTML\ Tags.Formats.Bigger\ \ \ \ \ \ ;bi TEXT3bcw endif nmap ;bi OTEXT3bcw vmap ;bi `>a`l imap ;bi TEXT3bcw " " Blink format - you might take this out to discourage use if has("gui") nmenu HTML\ Tags.Formats.Blink\ \ \ \ \ \ \ ;bk OTEXT3bcw vmenu HTML\ Tags.Formats.Blink\ \ \ \ \ \ \ ;bk `>a`l imenu HTML\ Tags.Formats.Blink\ \ \ \ \ \ \ ;bk TEXT3bcw endif nmap ;bk OTEXT3bcw vmap ;bk `>a`l imap ;bk TEXT3bcw " " Blockquote format if has("gui") nmenu HTML\ Tags.Formats.Blockquote\ \ ;bl O
TEXT
3bcw vmenu HTML\ Tags.Formats.Blockquote\ \ ;bl `>a`l imenu HTML\ Tags.Formats.Blockquote\ \ ;bl
TEXT
3bcw endif nmap ;bl O
TEXT
3bcw vmap ;bl `>a`l imap ;bl
TEXT
3bcw " " Center format if has("gui") nmenu HTML\ Tags.Formats.Center\ \ \ \ \ \ ;ce O
TEXT
3bcw vmenu HTML\ Tags.Formats.Center\ \ \ \ \ \ ;ce `>a`l imenu HTML\ Tags.Formats.Center\ \ \ \ \ \ ;ce
TEXT
3bcw endif nmap ;ce O
TEXT
3bcw vmap ;ce `>a`l imap ;ce
TEXT
3bcw " " Cite format if has("gui") nmenu HTML\ Tags.Formats.Cite\ \ \ \ \ \ \ \ ;ci OTEXT3bcw vmenu HTML\ Tags.Formats.Cite\ \ \ \ \ \ \ \ ;ci `>a`l imenu HTML\ Tags.Formats.Cite\ \ \ \ \ \ \ \ ;ci TEXT3bcw endif nmap ;ci OTEXT3bcw vmap ;ci `>a`l imap ;ci TEXT3bcw " " Code format if has("gui") nmenu HTML\ Tags.Formats.Code\ \ \ \ \ \ \ \ ;co OTEXT3bcw vmenu HTML\ Tags.Formats.Code\ \ \ \ \ \ \ \ ;co `>a`l imenu HTML\ Tags.Formats.Code\ \ \ \ \ \ \ \ ;co TEXT3bcw endif nmap ;co OTEXT3bcw vmap ;co `>a`l imap ;co TEXT3bcw " " Definition format if has("gui") nmenu HTML\ Tags.Formats.Definition\ \ ;df OTEXT3bcw vmenu HTML\ Tags.Formats.Definition\ \ ;df `>a`l imenu HTML\ Tags.Formats.Definition\ \ ;df TEXT3bcw endif nmap ;df OTEXT3bcw vmap ;df `>a`l imap ;df TEXT3bcw " " Emphasis format if has("gui") nmenu HTML\ Tags.Formats.Emphasis\ \ \ \ ;em OTEXT3bcw vmenu HTML\ Tags.Formats.Emphasis\ \ \ \ ;em `>a`l imenu HTML\ Tags.Formats.Emphasis\ \ \ \ ;em TEXT3bcw endif nmap ;em OTEXT3bcw vmap ;em `>a`l imap ;em TEXT3bcw " " Italics format if has("gui") nmenu HTML\ Tags.Formats.Italics\ \ \ \ \ ;it OTEXT3bcw vmenu HTML\ Tags.Formats.Italics\ \ \ \ \ ;it `>a`l imenu HTML\ Tags.Formats.Italics\ \ \ \ \ ;it TEXT3bcw endif nmap ;it OTEXT3bcw vmap ;it `>a`l imap ;it TEXT3bcw " " Keyboard format if has("gui") nmenu HTML\ Tags.Formats.Keyboard\ \ \ \ ;kb OTEXT3bcw vmenu HTML\ Tags.Formats.Keyboard\ \ \ \ ;kb `>a`l imenu HTML\ Tags.Formats.Keyboard\ \ \ \ ;kb TEXT3bcw endif nmap ;kb OTEXT3bcw vmap ;kb `>a`l imap ;kb TEXT3bcw " " No break format if has("gui") nmenu HTML\ Tags.Formats.No\ Break\ \ \ \ ;nb OTEXT3bcw vmenu HTML\ Tags.Formats.No\ Break\ \ \ \ ;nb `>a`l imenu HTML\ Tags.Formats.No\ Break\ \ \ \ ;nb TEXT3bcw endif nmap ;nb OTEXT3bcw vmap ;nb `>a`l imap ;nb TEXT3bcw " " Pre format if has("gui") nmenu HTML\ Tags.Formats.Preformat\ \ \ ;pr O
TEXT
3bcw vmenu HTML\ Tags.Formats.Preformat\ \ \ ;pr `>a`l imenu HTML\ Tags.Formats.Preformat\ \ \ ;pr
TEXT
3bcw endif nmap ;pr O
TEXT
3bcw vmap ;pr `>a`l imap ;pr
TEXT
3bcw " " Strike format if has("gui") nmenu HTML\ Tags.Formats.Strike\ \ \ \ \ \ ;sk OTEXT3bcw vmenu HTML\ Tags.Formats.Strike\ \ \ \ \ \ ;sk `>a`l imenu HTML\ Tags.Formats.Strike\ \ \ \ \ \ ;sk TEXT3bcw endif nmap ;sk OTEXT3bcw vmap ;sk `>a`l imap ;sk TEXT3bcw " " Sample format if has("gui") nmenu HTML\ Tags.Formats.Sample\ \ \ \ \ \ ;sa OTEXT3bcw vmenu HTML\ Tags.Formats.Sample\ \ \ \ \ \ ;sa `>a`l imenu HTML\ Tags.Formats.Sample\ \ \ \ \ \ ;sa TEXT3bcw endif nmap ;sa OTEXT3bcw vmap ;sa `>a`l imap ;sa TEXT3bcw " " Small format if has("gui") nmenu HTML\ Tags.Formats.Smaller\ \ \ \ \ ;sm OTEXT3bcw vmenu HTML\ Tags.Formats.Smaller\ \ \ \ \ ;sm `>a`l imenu HTML\ Tags.Formats.Smaller\ \ \ \ \ ;sm TEXT3bcw endif nmap ;sm OTEXT3bcw vmap ;sm `>a`l imap ;sm TEXT3bcw " " Strong format if has("gui") nmenu HTML\ Tags.Formats.Strong\ \ \ \ \ \ ;st OTEXT3bcw vmenu HTML\ Tags.Formats.Strong\ \ \ \ \ \ ;st `>a`l imenu HTML\ Tags.Formats.Strong\ \ \ \ \ \ ;st TEXT3bcw endif nmap ;st OTEXT3bcw vmap ;st `>a`l imap ;st TEXT3bcw " " Subscript format if has("gui") nmenu HTML\ Tags.Formats.Subscript\ \ \ ;sb OTEXT3bcw vmenu HTML\ Tags.Formats.Subscript\ \ \ ;sb `>a`l imenu HTML\ Tags.Formats.Subscript\ \ \ ;sb TEXT3bcw endif nmap ;sb OTEXT3bcw vmap ;sb `>a`l imap ;sb TEXT3bcw " " Superscript format if has("gui") nmenu HTML\ Tags.Formats.Superscript\ ;sp OTEXT3bcw vmenu HTML\ Tags.Formats.Superscript\ ;sp `>a`l imenu HTML\ Tags.Formats.Superscript\ ;sp TEXT3bcw endif nmap ;sp OTEXT3bcw vmap ;sp `>a`l imap ;sp TEXT3bcw " " Typewriter heading if has("gui") nmenu HTML\ Tags.Formats.Typerwriter\ ;tt OTEXT3bcw vmenu HTML\ Tags.Formats.Typerwriter\ ;tt `>a`l imenu HTML\ Tags.Formats.Typerwriter\ ;tt TEXT3bcw endif nmap ;tt OTEXT3bcw vmap ;tt `>a`l imap ;tt TEXT3bcw " " Underline heading if has("gui") nmenu HTML\ Tags.Formats.Underline\ \ \ ;uu OTEXT3bcw vmenu HTML\ Tags.Formats.Underline\ \ \ ;uu `>a`l imenu HTML\ Tags.Formats.Underline\ \ \ ;uu TEXT3bcw endif nmap ;uu OTEXT3bcw vmap ;uu `>a`l imap ;uu TEXT3bcw " " Variable format if has("gui") nmenu HTML\ Tags.Formats.Variable\ \ \ \ ;vv OTEXT3bcw vmenu HTML\ Tags.Formats.Variable\ \ \ \ ;vv `>a`l imenu HTML\ Tags.Formats.Variable\ \ \ \ ;vv TEXT3bcw endif nmap ;vv OTEXT3bcw vmap ;vv `>a`l imap ;vv TEXT3bcw " """ List Sub-Menu " normal creates selected item on previous line " visual creates selected item around visual selection " insert creates selected item at cursor position " " for multi-line visual selections with ;ul, ;ol, etc. inserts "
  • at beginning of selection and at beginning of each line " in selection and puts whole thing in list (
      , e.g) " - kind of a kludge right now, but it works " """" list Item - if has("gui") nmenu HTML\ Tags.List.List\ Item\ \ \ \ \ \ \ ;li O
    • LIST ITEM2b2cw vmenu HTML\ Tags.List.List\ Item\ \ \ \ \ \ \ ;li ` imenu HTML\ Tags.List.List\ Item\ \ \ \ \ \ \ ;li
    • LIST ITEM2b2cw endif nmap ;li O
    • LIST ITEM2b2cw vmap ;li ` imap ;li
    • LIST ITEM2b2cw " """" list Header if has("gui") nmenu HTML\ Tags.List.List\ Header\ \ \ \ \ ;lh OLIST HEADER4b2cw vmenu HTML\ Tags.List.List\ Header\ \ \ \ \ ;lh `>a`l imenu HTML\ Tags.List.List\ Header\ \ \ \ \ ;lh LIST HEADER4b2cw endif nmap ;lh OLIST HEADER4b2cw vmap ;lh `>a`l imap ;lh LIST HEADER4b2cw " """" Unordered List if has("gui") nmenu HTML\ Tags.List.Unordered\ List\ \ ;ul O
      • LIST ITEM
      4b2cw vmenu HTML\ Tags.List.Unordered\ List\ \ ;ul `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.ul>4x4X imenu HTML\ Tags.List.Unordered\ List\ \ ;ul
      • LIST ITEM
      4b2cw endif nmap ;ul O
      • LIST ITEM
      4b2cw vmap ;ul `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.ul>4x4X imap ;ul
      • LIST ITEM
      4b2cw " """" Ordered List if has("gui") nmenu HTML\ Tags.List.Ordered\ List\ \ \ \ ;ol O
      1. LIST ITEM
      4b2cw vmenu HTML\ Tags.List.Ordered\ List\ \ \ \ ;ol `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.ol>4x4X imenu HTML\ Tags.List.Ordered\ List\ \ \ \ ;ol
      1. LIST ITEM
      4b2cw endif nmap ;ol O
      1. LIST ITEM
      4b2cw vmap ;ol `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.ol>4x4X imap ;ol
      1. LIST ITEM
      4b2cw " """" Directory List if has("gui") nmenu HTML\ Tags.List.Directory\ List\ \ ;di O
    • LIST ITEM
    • 4b2cw vmenu HTML\ Tags.List.Directory\ List\ \ ;di `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.dir>4x4X imenu HTML\ Tags.List.Directory\ List\ \ ;di
    • LIST ITEM
    • 4b2cw endif nmap ;di O
    • LIST ITEM
    • 4b2cw vmap ;di `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.dir>4x4X imap ;di
    • LIST ITEM
    • 4b2cw " """" Menu List if has("gui") nmenu HTML\ Tags.List.Menu\ List\ \ \ \ \ \ \ ;mu O
    • LIST ITEM4b2cw vmenu HTML\ Tags.List.Menu\ List\ \ \ \ \ \ \ ;mu `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.mu>4x4X imenu HTML\ Tags.List.Menu\ List\ \ \ \ \ \ \ ;mu
    • LIST ITEM4b2cw endif nmap ;mu O
    • LIST ITEM4b2cw vmap ;mu `>a:'<+1,'>+1s/^/
    • /`
    • /
    • <.mu>4x4X imap ;mu
    • LIST ITEM4b2cw " """" Definition Item " dt an dd are the same menu item - though dd can be called via the ;dd macro " below. this assumes you will always want a dd with every dd. if has("gui") nmenu HTML\ Tags.List.Definition\ \ \ \ \ \ ;dt O
      TERM
      DEFINITION5bcw vmenu HTML\ Tags.List.Definition\ \ \ \ \ \ ;dt `>a
      DEFINITION `5wcw imenu HTML\ Tags.List.Definition\ \ \ \ \ \ ;dt
      TERM
      DEFINITION5bcw endif nmap ;dt O
      TERM
      DEFINITION5bcw vmap ;dt `>a
      DEFINITION `5wcw imap ;dt
      TERM
      DEFINITION5bcw " """" Definition list " TODO - set this up so that multi-line visual seleciton get turned into multiple " entries (like ul, ol, etc.) if has("gui") nmenu HTML\ Tags.List.Definition\ List\ ;dl O
    • LIST ITEM
    • 4b2cw vmenu HTML\ Tags.List.Definition\ List\ ;dl `>a
      DEFINITION`
      l imenu HTML\ Tags.List.Definition\ List\ ;dl
    • LIST ITEM
    • 4b2cw endif nmap ;dl O
    • LIST ITEM
    • 4b2cw vmap ;dl `>a`
    • l imap ;dl
    • LIST ITEM
    • 4b2cw " " TODO - tables submenu, forms submenu " " " " SECTION 2: macros unassociated with menus " In this section - I placed some of the Macros from Doug's file that " I didn't think would be used often enought to justify a menu listing. " Actually, I could probably reduce the number in the menus as well. " Generally, if an HTML tag is used once in a document (like ) then " it shouldn't be in a menu. If you use a template (like the one I " call below), then most of those things would be there anyways. I put " a lot of 3.0 tags in this section because they might not be generally " supported yet. " " Haven't set up visual or normal modes for these - still working on the " visual v. visual lines problem - prob fixed in VIM5.0g - still TODO " " ABBREV (3.0) map! ;ab bhhi " ACRONYM (3.0) map! ;ac bhhi " AU (Author) (3.0) map! ;au bhhi " BANNER (3.0) map! ;ba bhhi " BASE (head) map! ;bh hi " BASEFONT (Netscape) map! ;bf i " BODY map! ;bd O " CAPTION (3.0) map! ;ca bhhi " CREDIT (3.0) map! ;cr bhhi " DD (definition for definition list) map! ;dd
      bhhi " DEL (deleted text) (3.0) map! ;de bhhi " DIV (document division) (3.0) map! ;dv
      bhhi " FIG (figure) (3.0) map! ;fi ?"i " FN (footnote) (3.0) map! ;fn bhhi " FONT (Netscape) map! ;fo bhhhi " HEAD map! ;he O " HTML (3.0) map! ;ht O " INS (inserted text) (3.0) map! ;in bhhi " LANG (language context) (3.0) map! ;la ?"i " LINK (head) map! ;lk hi " META (head) map! ;me ?""??a " NOTE (3.0) map! ;no bhhi " OVERLAY (figure overlay image) (3.0) map! ;ov hi " P (paragraph) map! ;pp

      " Q (quote) (3.0) map! ;qu hhhi " RANGE (3.0) (head) map! ;ra Bhi " STYLE (3.0) map! ;sn k/"a " TAB (3.0) map! ;ta " TITLE (head) map! ;ti bhhi " WBR (word break) (Netscape) map! ;wb " Special Characters map! ;& & map! ;cp © map! ;" " map! ;< < map! ;> > " " " SECTION 3: Additional Autocommands " """ read in skeleton file :au BufNewFile *.html 0r ~/.vim/skeleton.html """ Change modification data in first 30 lines of file (from vim help) :au BufWritePre *.html ks|1,30g/Last modification: /normal f:lD:read !date kJ's """ Setup browser to display when writing files :au BufWritePost *.html !netscape -remote 'openFile(%:p)'