" Indentation set autoindent " Use the current line's indent level to set the indent level of new lines set smartindent " Attempt to guess the indent level of any new line based on the previous line set smarttab set wrap " Wrap long lines visually, but don't actually insert breaks set expandtab set shiftwidth=2 " Stuff you see set ruler " Show the cursor position set laststatus=2 " Always show status line set showmatch " Makes cursor briefly jump to brace/parenthese/bracket's match set showmode " Show the current editing mode at all times set showcmd " Show incomplete commands " Searching set incsearch " Move cursor to matched string while typing search string set hlsearch " Highlight searched-for phrases " Miscellaneous set visualbell set textwidth=0 set nocompatible " Use vim defaults; breaks compatibility with original vi "set virtualedit=all " Allows cursor to roam freely anywhere in command mode set nostartofline " Don't jump to the first char. when paging set backspace=indent,eol,start " Allow backspace in insert mode "set spell " Turns on the spell checker; Vim 7 set ttyfast " We have a fast terminal connection " tab mappings: Command-[ for previous tab, Command-] for next tab nmap gT nmap gt " Gvim preferences; see also ~/.gvimrc if has('gui_running') colorscheme spring set guifont=Andale_Mono:h15:cDEFAULT endif " Syntax highlighting 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 " Autocmd stuff if has("autocmd") filetype plugin indent on autocmd FileType text setlocal textwidth=78 autocmd BufRead,BufNewFile *.c,*.conf,*.h,Makefile*,*.txt set noexpandtab autocmd BufRead,BufNewFile *.js let javaScript_fold=1 " Jump to last edit position when opening a file autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif endif " FoldSearch-based folding. " Copyright (C) 2005 Mauricio Fernandez " Current version: http://eigenclass.org/hiki.rb?Usable+Ruby+folding+for+Vim " " Add this to your .vimrc and fold with :R. The default fold expression will " work with Ruby scripts; you can specify where folds start with " let b:foldsearchexpr = 'myexpression' " e.g. " let b:foldsearchexpr='\(^\s*\(\(private\|public\|protected\|class\)\s\)\)' " or so for Java. " One way to have this buffer-local variable set is " au Filetype java let b:foldsearchexpr='\(^\s*\(\(private\|public\|protected\|class\)\s\)\)' " " It is possible to have comments above a method/class/etc be included in the " fold, by setting b:foldsearchprefix. All the lines above the detected fold " matching b:foldsearchprefix will be included in said fold. " For instance, for Ruby code: " let b:foldsearchprefix = '\v^\s*(#.*)?$' " which can be automated with " au Filetype ruby let b:foldsearchprefix='\v^\s*(#.*)?$' " " Changelog: " 2005-12-12 1.1 use b:foldsearchprefix to prepend comments to a fold. "{{{ set s:sid map xx xx let s:sid = maparg("xx") unmap xx let s:sid = substitute(s:sid, 'xx', '', '') "{{{ FoldText function! s:Num2S(num, len) let filler = " " let text = '' . a:num return strpart(filler, 1, a:len - strlen(text)) . text endfunction execute 'set foldtext=' . s:sid . 'MyNewFoldText()' function! MyNewFoldText() let linenum = v:foldstart while linenum <= v:foldend let line = getline(linenum) if !exists("b:foldsearchprefix") || match(line, b:foldsearchprefix) == -1 break else let linenum = linenum + 1 endif endwhile if exists("b:foldsearchprefix") && match(line, b:foldsearchprefix) != -1 " all lines matched the prefix regexp let line = getline(v:foldstart) endif let sub = substitute(line, '/\*\|\*/\|{{{\d\=', '', 'g') let diff = v:foldend - v:foldstart + 1 return '+ [' . s:Num2S(diff,4) . ']' . sub endfunction "{{{~foldsearch adapted from t77: Fold on search result (Fs ) "Fs pattern Fold search "Vimtip put to good use by Ralph Amissah zxy@irc.freenode.net "Modified by Mauricio Fernandez function! Foldsearch(search) setlocal fdm=manual let origlineno = line(".") normal zE normal G$ let folded = 0 "flag to set when a fold is found let flags = "w" "allow wrapping in the search let line1 = 0 "set marker for beginning of fold if a:search == "" if exists("b:foldsearchexpr") let searchre = b:foldsearchexpr else "Default value, suitable for Ruby scripts "\(^\s*\(\(def\|class\|module\)\s\)\)\|^\s*[#%"0-9]\{0,4\}\s*{\({{\|!!\) let searchre = '\v(^\s*(def|class|module|attr_reader|attr_accessor|alias_method)\s' . \ '|^\s*\w+attr_(reader|accessor)\s|^\s*[#%"0-9]{0,4}\s*\{(\{\{|!!))' . \ '|^\s*[A-Z]\w+\s*\=' let b:foldsearchexpr = searchre endif else let searchre = a:search endif while search(searchre, flags) > 0 let line2 = line(".") while line2 - 1 >= line1 && line2 - 1 > 0 "sanity check let prevline = getline(line2 - 1) if exists("b:foldsearchprefix") && (match(prevline, b:foldsearchprefix) != -1) let line2 = line2 - 1 else break endif endwhile if (line2 -1 >= line1) execute ":" . line1 . "," . (line2-1) . "fold" let folded = 1 "at least one fold has been found endif let line1 = line2 "update marker let flags = "W" "turn off wrapping endwhile normal $G let line2 = line(".") if (line2 >= line1 && folded == 1) execute ":". line1 . "," . line2 . "fold" endif execute "normal " . origlineno . "G" endfunction "{{{~folds Fold Patterns " Command is executed as ':Fs pattern'" command! -nargs=? -complete=command Fs call Foldsearch() command! -nargs=? -complete=command Fold call Foldsearch() "command! R Fs \(^\s*\(\(def\|class\|module\)\s\)\)\|^\s*[#%"0-9]\{0,4\}\s*{\({{\|!!\) command! Z Fs au Filetype ruby let b:foldsearchprefix='\v^\s*(#.*)?$' set path+=/home/svessels/work/prottra/app/** set path+=/home/svessels/work/prottra/lib/** set suffixesadd=.rb set includeexpr+=substitute(v:fname,'s$','','g') set path+=.rhtml iab forin for @element@ in @collection@ @element@.@@end<li imap /@[^@]*@/li imap ld/@xF@x/@[^@]*@li " 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! ;> >