" Vim filetype plugin file " Language: MediaWiki/Wikipedia " Maintianer: Christian J. Robinson " Last Change: 2008 Jun 18 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif setlocal textwidth=0 linebreak matchpairs+=<:> formatoptions+=l nnoremap k gk nnoremap j gj nnoremap gk nnoremap gj nnoremap 0 g0 nnoremap ^ g^ nnoremap $ g$ inoremap gk inoremap gj vnoremap k gk vnoremap j gj vnoremap gk vnoremap gj vnoremap 0 g0 vnoremap ^ g^ vnoremap $ g$ setlocal matchpairs+=<:> let b:do_xhtml_mappings = 1 let b:no_html_maps='^\(;ah\|;aH\|;im\|;it\|;bo\|;[Hh]\d\|;[Hh]r\|;ol\|;ul\|;ca\|;ta\|;tr\|;td\|;th\)$' runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim if ! exists('g:did_wikipedia_mappings') let g:did_wikipedia_mappings = 1 call HTMLmap("inoremap", "ah", "[[]]") call HTMLmap("inoremap", "aH", "[]") call HTMLmap("vnoremap", "ah", "`>a]]`<[[2f]", -1) call HTMLmap("vnoremap", "aH", "`>a]`<[f]", 0) call HTMLmapo('ah', 0) call HTMLmapo('aH', 0) call HTMLmap("inoremap", "im", "[[Image:]]") call HTMLmap("vnoremap", "im", "`>a]]`<[[Image:2f]", -1) call HTMLmapo('im', 0) call HTMLmap("inoremap", "it", "''''") call HTMLmap("vnoremap", "it", "`>a''`<''2f'", -1) call HTMLmapo('it', 0) call HTMLmap("inoremap", "bo", "''''''") call HTMLmap("vnoremap", "bo", "`>a'''`<'''3f'", -1) call HTMLmapo('bo', 0) call HTMLmap("inoremap", "h1", "====1hi") call HTMLmap("inoremap", "h2", "======2hi") call HTMLmap("inoremap", "h3", "========3hi") call HTMLmap("inoremap", "h4", "==========4hi") call HTMLmap("inoremap", "h5", "============5hi") call HTMLmap("inoremap", "h6", "==============6hi") call HTMLmap("vnoremap", "h1", "`>a==`<==2f=", -1) call HTMLmap("vnoremap", "h2", "`>a===`<===3f=", -1) call HTMLmap("vnoremap", "h3", "`>a====`<====4f=", -1) call HTMLmap("vnoremap", "h4", "`>a=====`<=====5f=", -1) call HTMLmap("vnoremap", "h5", "`>a======`<======6f=", -1) call HTMLmap("vnoremap", "h6", "`>a=======`<=======7f=", -1) call HTMLmapo("h1", 0) call HTMLmapo("h2", 0) call HTMLmapo("h3", 0) call HTMLmapo("h4", 0) call HTMLmapo("h5", 0) call HTMLmapo("h6", 0) call HTMLmap("inoremap", "hr", "----") call HTMLmap("inoremap", "ol", "#") call HTMLmap("inoremap", "ul", "*") call HTMLmap("inoremap", "ca", "\\|+ ") call HTMLmap("inoremap", "ta", "{\\| class=\"wikitable\"\\|}O") call HTMLmap("inoremap", "tr", "\\|-") call HTMLmap("inoremap", "td", "\\| ") call HTMLmap("inoremap", "th", "! ") call HTMLmap("vnoremap", "ta", "`>a\\|}`<{\\| class=\"wikitable\"", -1) endif