Súbor: [Platon] / vimconfig / vim / ftplugin / html.vim (stiahnutie)
Revízia 1.9, Thu Jun 16 13:30:20 2005 UTC (21 years, 4 months ago) by rajo
Zmeny od 1.8: +3 -2
[lines]
b:input_method is set to &encoding value by default (with some
exceptions). This improves support for UTF-8 locales.
|
" HTML filetype plugin
" Language: HTML (ft=html)
" Maintainer: Srinath Avadhanula <srinath AT eecs.berkeley.edu>
" License: GNU GPL
" Version: $Platon: vimconfig/vim/ftplugin/html.vim,v 1.8 2003/11/03 08:20:21 rajo Exp $
" HTML mappings {{{
if !exists('s:doneMappings')
let s:doneMappings = 1
let s:ml = exists('g:mapleader') ? g:mapleader : '\'
" Create parent tag for tag on current line
imap <buffer> QQ </><Esc>2F<lywf>f/pF<i
" Create tag from previous word
imap <buffer> ,, ></><ESC>3hbi<<ESC>lvt>ugvy/</><CR>lp?></<CR>a<C-O>:nohlsearch<CR>
" Create tag from previous word but add also newlines
imap <buffer> ,. ,,<CR><CR><Up><Space><Space>
" HTML commands {{{2
call IMAP ('tab' .s:ml, "<table border=2 cellspacing=2 cellpadding=5>\<cr><tr>\<cr>\<tab><td>ää</td>\<cr>\<bs></tr>\<cr></table>", 'html')
call IMAP ('ref' .s:ml, "<a href=\"ää\"></a>", 'html')
call IMAP ('ol' .s:ml, "<ol>\<cr><li>ää</li>\<cr></ol>", 'html')
call IMAP ('ul' .s:ml, "<ul>\<cr><li>ää</li>\<cr></ul>", 'html')
call IMAP ('tr' .s:ml, "<tr>\<cr>\<tab><td>ää</td>\<cr>\<bs></tr>", 'html')
call IMAP ('td' .s:ml, "<td>ää</td>", 'html')
call IMAP ('bb' .s:ml, "<b>ää</b>", 'html')
call IMAP ('it' .s:ml, "<i>ää</i>", 'html')
" HTML greek characters {{{2
call IMAP ('a' .s:ml, "\α", 'html')
call IMAP ('b' .s:ml, "\β", 'html')
call IMAP ('c' .s:ml, "\χ", 'html')
call IMAP ('d' .s:ml, "\δ", 'html')
call IMAP ('e' .s:ml, "\ε", 'html')
call IMAP ('f' .s:ml, "\φ", 'html')
call IMAP ('g' .s:ml, "\γ", 'html')
call IMAP ('h' .s:ml, "\η", 'html')
call IMAP ('k' .s:ml, "\κ", 'html')
call IMAP ('l' .s:ml, "\λ", 'html')
call IMAP ('m' .s:ml, "\μ", 'html')
call IMAP ('n' .s:ml, "\ν", 'html')
call IMAP ('p' .s:ml, "\π", 'html')
call IMAP ('q' .s:ml, "\θ", 'html')
call IMAP ('r' .s:ml, "\ρ", 'html')
call IMAP ('s' .s:ml, "\σ", 'html')
call IMAP ('t' .s:ml, "\τ", 'html')
call IMAP ('u' .s:ml, "\υ", 'html')
call IMAP ('v' .s:ml, "\ς", 'html')
call IMAP ('w' .s:ml, "\ω", 'html')
call IMAP ('x' .s:ml, "\ξ", 'html')
call IMAP ('y' .s:ml, "\ψ", 'html')
call IMAP ('z' .s:ml, "\ζ", 'html')
call IMAP ('A' .s:ml, "\Α", 'html')
call IMAP ('B' .s:ml, "\Β", 'html')
call IMAP ('C' .s:ml, "\Χ", 'html')
call IMAP ('D' .s:ml, "\Δ", 'html')
call IMAP ('E' .s:ml, "\Ε", 'html')
call IMAP ('F' .s:ml, "\Φ", 'html')
call IMAP ('G' .s:ml, "\Γ", 'html')
call IMAP ('H' .s:ml, "\Η", 'html')
call IMAP ('K' .s:ml, "\Κ", 'html')
call IMAP ('L' .s:ml, "\Λ", 'html')
call IMAP ('M' .s:ml, "\Μ", 'html')
call IMAP ('N' .s:ml, "\Ν", 'html')
call IMAP ('P' .s:ml, "\Π", 'html')
call IMAP ('Q' .s:ml, "\Θ", 'html')
call IMAP ('R' .s:ml, "\Ρ", 'html')
call IMAP ('S' .s:ml, "\Σ", 'html')
call IMAP ('T' .s:ml, "\Τ", 'html')
call IMAP ('U' .s:ml, "\Υ", 'html')
call IMAP ('V' .s:ml, "\&Varsigma;", 'html')
call IMAP ('W' .s:ml, "\Ω", 'html')
call IMAP ('X' .s:ml, "\Ξ", 'html')
call IMAP ('Y' .s:ml, "\Ψ", 'html')
call IMAP ('Z' .s:ml, "\Ζ", 'html')
" }}}
endif
" end HTML mappings }}}
" SmartBS: smart backspacing {{{
let g:smartBS_html = '\(' .
\ '&[^;]\+;' .
\ '\)' . "$"
inoremap <buffer> <BS> <C-R>=SmartBS()<CR>
" }}}
" let b:input_method = "iso8859-2"
let b:input_method = &encoding
call UseDiacritics()
" Modeline {{{
" vim:set ts=4:
" vim600:fdm=marker fdl=0 fdc=3 nowrap:
" }}}
Platon Group <platon@platon.sk> http://platon.sk/
|