" Vim filetype plugin file " File: diacritics.vim " Maintainer: Lubomir Host 'rajo' " License: GNU GPL " Version: $Platon: vimconfig/vim/modules/diacritics.vim,v 1.7 2005/04/20 22:47:41 rajo Exp $ " " This file is sourced if some ftplugin require diacritics (IMAP() mappings) " This plugin is (must be) sourced by ~/.vimrc, because " many ftplugins are using function IMAP() if exists("b:input_method") if b:input_method == "tex-universal" " universal TeX mappings {{{ call IMAP ('=a', "\\\'{a}", &filetype) call IMAP ('+a', "\\v{a}", &filetype) call IMAP ('+}', "\\\"{a}", &filetype) call IMAP ('=b', "\\'{b}", &filetype) call IMAP ('+b', "\\v{b}", &filetype) call IMAP ('=c', "\\'{c}", &filetype) call IMAP ('+c', "\\v{c}", &filetype) call IMAP ('=d', "\\'{d}", &filetype) call IMAP ('+d', "\\v{d}", &filetype) call IMAP ('=e', "\\'{e}", &filetype) call IMAP ('+e', "\\v{e}", &filetype) call IMAP ('=f', "\\'{f}", &filetype) call IMAP ('+f', "\\v{f}", &filetype) call IMAP ('=g', "\\'{g}", &filetype) call IMAP ('+g', "\\v{g}", &filetype) call IMAP ('=h', "\\'{h}", &filetype) call IMAP ('+h', "\\v{h}", &filetype) call IMAP ('=i', "\\'{\\i}", &filetype) call IMAP ('+i', "\\v{\\i}", &filetype) "call IMAP ('=j', "\\'{\\j}", &filetype) "call IMAP ('+j', "\\v{\\j}", &filetype) "call IMAP ('=k', "\\'{k}", &filetype) "call IMAP ('+k', "\\v{k}", &filetype) call IMAP ('=l', "\\'{l}", &filetype) call IMAP ('+l', "\\q l", &filetype) call IMAP ('=m', "\\'{m}", &filetype) call IMAP ('+m', "\\v{m}", &filetype) call IMAP ('=n', "\\'{n}", &filetype) call IMAP ('+n', "\\v{n}", &filetype) call IMAP ('=o', "\\'{o}", &filetype) call IMAP ('+o', "\\v{o}", &filetype) call IMAP ('+:', "\\^{o}", &filetype) call IMAP ('=p', "\\'{p}", &filetype) call IMAP ('+p', "\\v{p}", &filetype) call IMAP ('=q', "\\'{q}", &filetype) call IMAP ('+q', "\\v{q}", &filetype) call IMAP ('=r', "\\'{r}", &filetype) call IMAP ('+r', "\\v{r}", &filetype) call IMAP ('=s', "\\'{s}", &filetype) call IMAP ('+s', "\\v{s}", &filetype) call IMAP ('=t', "\\'{t}", &filetype) call IMAP ('+t', "\\q t", &filetype) call IMAP ('=u', "\\'{u}", &filetype) call IMAP ('+u', "\\v{u}", &filetype) call IMAP ('=v', "\\'{v}", &filetype) call IMAP ('+v', "\\v{v}", &filetype) call IMAP ('=w', "\\'{w}", &filetype) call IMAP ('+w', "\\v{w}", &filetype) call IMAP ('=x', "\\'{x}", &filetype) call IMAP ('+x', "\\v{x}", &filetype) call IMAP ('=y', "\\'{y}", &filetype) call IMAP ('+y', "\\v{y}", &filetype) call IMAP ('=z', "\\'{z}", &filetype) call IMAP ('+z', "\\v{z}", &filetype) call IMAP ('=A', "\\'{A}", &filetype) call IMAP ('+A', "\\v{A}", &filetype) call IMAP ('=B', "\\'{B}", &filetype) call IMAP ('+B', "\\v{B}", &filetype) call IMAP ('=C', "\\'{C}", &filetype) call IMAP ('+C', "\\v{C}", &filetype) call IMAP ('=D', "\\'{D}", &filetype) call IMAP ('+D', "\\v{D}", &filetype) call IMAP ('=E', "\\'{E}", &filetype) call IMAP ('+E', "\\v{E}", &filetype) call IMAP ('=F', "\\'{F}", &filetype) call IMAP ('+F', "\\v{F}", &filetype) call IMAP ('=G', "\\'{G}", &filetype) call IMAP ('+G', "\\v{G}", &filetype) call IMAP ('=H', "\\'{H}", &filetype) call IMAP ('+H', "\\v{H}", &filetype) call IMAP ('=I', "\\'{I}", &filetype) call IMAP ('+I', "\\v{I}", &filetype) "call IMAP ('=J', "\\'{J}", &filetype) "call IMAP ('+J', "\\v{J}", &filetype) call IMAP ('=K', "\\'{K}", &filetype) call IMAP ('+K', "\\v{K}", &filetype) call IMAP ('=L', "\\'{L}", &filetype) call IMAP ('+L', "\\v{L}", &filetype) call IMAP ('=M', "\\'{M}", &filetype) call IMAP ('+M', "\\v{M}", &filetype) call IMAP ('=N', "\\'{N}", &filetype) call IMAP ('+N', "\\v{N}", &filetype) call IMAP ('=O', "\\'{O}", &filetype) call IMAP ('+O', "\\v{O}", &filetype) call IMAP ('=P', "\\'{P}", &filetype) call IMAP ('+P', "\\v{P}", &filetype) call IMAP ('=Q', "\\'{Q}", &filetype) call IMAP ('+Q', "\\v{Q}", &filetype) call IMAP ('=R', "\\'{R}", &filetype) call IMAP ('+R', "\\v{R}", &filetype) call IMAP ('=S', "\\'{S}", &filetype) call IMAP ('+S', "\\v{S}", &filetype) call IMAP ('=T', "\\'{T}", &filetype) call IMAP ('+T', "\\v{T}", &filetype) call IMAP ('=U', "\\'{U}", &filetype) call IMAP ('+U', "\\v{U}", &filetype) call IMAP ('=V', "\\'{V}", &filetype) call IMAP ('+V', "\\v{V}", &filetype) call IMAP ('=W', "\\'{W}", &filetype) call IMAP ('+W', "\\v{W}", &filetype) call IMAP ('=X', "\\'{X}", &filetype) call IMAP ('+X', "\\v{X}", &filetype) call IMAP ('=Y', "\\'{Y}", &filetype) call IMAP ('+Y', "\\v{Y}", &filetype) call IMAP ('=Z', "\\'{Z}", &filetype) call IMAP ('+Z', "\\v{Z}", &filetype) " end universal TeX mappings }}} elseif b:input_method == "tex-iso8859-2" || \ b:input_method == "tex-latin2" " iso8859-2(latin2) TeX mappings {{{ call IMAP ('=a', "á", &filetype) call IMAP ('+a', "\\v{a}", &filetype) call IMAP ('+}', "ä", &filetype) call IMAP ('=b', "\\'{b}", &filetype) call IMAP ('+b', "\\v{b}", &filetype) call IMAP ('=c', "æ", &filetype) call IMAP ('+c', "è", &filetype) call IMAP ('=d', "\\'{d}", &filetype) call IMAP ('+d', "ï", &filetype) call IMAP ('=e', "é", &filetype) call IMAP ('+e', "ì", &filetype) call IMAP ('=f', "\\'{f}", &filetype) call IMAP ('+f', "\\v{f}", &filetype) call IMAP ('=g', "\\'{g}", &filetype) call IMAP ('+g', "\\v{g}", &filetype) call IMAP ('=h', "\\'{h}", &filetype) call IMAP ('+h', "\\v{h}", &filetype) call IMAP ('=i', "í", &filetype) call IMAP ('+i', "\\v{\\i}", &filetype) "call IMAP ('=j', "\\'{\\j}", &filetype) "call IMAP ('+j', "\\v{\\j}", &filetype) "call IMAP ('=k', "\\'{k}", &filetype) "call IMAP ('+k', "\\v{k}", &filetype) call IMAP ('=l', "å", &filetype) call IMAP ('+l', "µ", &filetype) call IMAP ('=m', "\\'{m}", &filetype) call IMAP ('+m', "\\v{m}", &filetype) call IMAP ('=n', "ñ", &filetype) call IMAP ('+n', "ò", &filetype) call IMAP ('=o', "ó", &filetype) call IMAP ('+o', "ö", &filetype) call IMAP ('+:', "ô", &filetype) call IMAP ('=p', "\\'{p}", &filetype) call IMAP ('+p', "\\v{p}", &filetype) call IMAP ('=q', "\\'{q}", &filetype) call IMAP ('+q', "\\v{q}", &filetype) call IMAP ('=r', "à", &filetype) call IMAP ('+r', "ø", &filetype) call IMAP ('=s', "¶", &filetype) call IMAP ('+s', "¹", &filetype) call IMAP ('=t', "\\'{t}", &filetype) call IMAP ('+t', "»", &filetype) call IMAP ('=u', "ú", &filetype) call IMAP ('+u', "ü", &filetype) call IMAP ('=v', "\\'{v}", &filetype) call IMAP ('+v', "\\v{v}", &filetype) call IMAP ('=w', "\\'{w}", &filetype) call IMAP ('+w', "\\v{w}", &filetype) call IMAP ('=x', "\\'{x}", &filetype) call IMAP ('+x', "\\v{x}", &filetype) call IMAP ('=y', "ý", &filetype) call IMAP ('+y', "\\v{y}", &filetype) call IMAP ('=z', "¼", &filetype) call IMAP ('+z', "¾", &filetype) call IMAP ('=A', "Á", &filetype) call IMAP ('+A', "Ä", &filetype) call IMAP ('=B', "\\'{B}", &filetype) call IMAP ('+B', "\\v{B}", &filetype) call IMAP ('=C', "Æ", &filetype) call IMAP ('+C', "È", &filetype) call IMAP ('=D', "\\'{D}", &filetype) call IMAP ('+D', "Ï", &filetype) call IMAP ('=E', "É", &filetype) call IMAP ('+E', "Ì", &filetype) call IMAP ('=F', "\\'{F}", &filetype) call IMAP ('+F', "\\v{F}", &filetype) call IMAP ('=G', "\\'{G}", &filetype) call IMAP ('+G', "\\v{G}", &filetype) call IMAP ('=H', "\\'{H}", &filetype) call IMAP ('+H', "\\v{H}", &filetype) call IMAP ('=I', "Í", &filetype) call IMAP ('+I', "\\v{I}", &filetype) "call IMAP ('=J', "\\'{J}", &filetype) "call IMAP ('+J', "\\v{J}", &filetype) call IMAP ('=K', "\\'{K}", &filetype) call IMAP ('+K', "\\v{K}", &filetype) call IMAP ('=L', "Å", &filetype) call IMAP ('+L', "¥", &filetype) call IMAP ('=M', "\\'{M}", &filetype) call IMAP ('+M', "\\v{M}", &filetype) call IMAP ('=N', "Ñ", &filetype) call IMAP ('+N', "Ò", &filetype) call IMAP ('=O', "Ó", &filetype) call IMAP ('+O', "Ô", &filetype) call IMAP ('=P', "\\'{P}", &filetype) call IMAP ('+P', "\\v{P}", &filetype) call IMAP ('=Q', "\\'{Q}", &filetype) call IMAP ('+Q', "\\v{Q}", &filetype) call IMAP ('=R', "À", &filetype) call IMAP ('+R', "Ø", &filetype) call IMAP ('=S', "¦", &filetype) call IMAP ('+S', "©", &filetype) call IMAP ('=T', "\\'{T}", &filetype) call IMAP ('+T', "«", &filetype) call IMAP ('=U', "Ú", &filetype) call IMAP ('+U', "Ü", &filetype) call IMAP ('=V', "\\'{V}", &filetype) call IMAP ('+V', "\\v{V}", &filetype) call IMAP ('=W', "\\'{W}", &filetype) call IMAP ('+W', "\\v{W}", &filetype) call IMAP ('=X', "\\'{X}", &filetype) call IMAP ('+X', "\\v{X}", &filetype) call IMAP ('=Y', "Ý", &filetype) call IMAP ('+Y', "\\v{Y}", &filetype) call IMAP ('=Z', "¬", &filetype) call IMAP ('+Z', "®", &filetype) " end iso8859-2(latin2) TeX mappings }}} elseif b:input_method == "iso-8859-2" || \ b:input_method == "iso8859-2" || \ b:input_method == "latin2" call Source("~/.vim/modules/diacritics-iso8859-2.vim") elseif b:input_method == "windows-1250" || \ b:input_method == "cp1250" call Source("~/.vim/modules/diacritics-windows-1250.vim") elseif b:input_method == "unicode-html" || \ b:input_method == "iso10464-html" " WML mappings {{{ call IMAP ('=a', "á", &filetype) ""call IMAP ('+a', "\\v{a}", &filetype) call IMAP ('+}', "ä", &filetype) ""call IMAP ('=b', "\\'{b}", &filetype) ""call IMAP ('+b', "\\v{b}", &filetype) call IMAP ('=c', "ć", &filetype) call IMAP ('+c', "č", &filetype) ""call IMAP ('=d', "\\'{d}", &filetype) call IMAP ('+d', "ď", &filetype) call IMAP ('=e', "é", &filetype) call IMAP ('+e', "ě", &filetype) ""call IMAP ('=f', "\\'{f}", &filetype) ""call IMAP ('+f', "\\v{f}", &filetype) ""call IMAP ('=g', "ǵ", &filetype) call IMAP ('+g', "ǧ", &filetype) ""call IMAP ('=h', "\\'{h}", &filetype) ""call IMAP ('+h', "\\v{h}", &filetype) call IMAP ('=i', "í", &filetype) ""call IMAP ('+i', "\\v{\\i}", &filetype) ""call IMAP ('=j', "\\'{\\j}", &filetype) ""call IMAP ('+j', "\\v{\\j}", &filetype) ""call IMAP ('=k', "\\'{k}", &filetype) ""call IMAP ('+k', "\\v{k}", &filetype) call IMAP ('=l', "ĺ", &filetype) call IMAP ('+l', "ľ", &filetype) ""call IMAP ('=m', "\\'{m}", &filetype) ""call IMAP ('+m', "\\v{m}", &filetype) call IMAP ('=n', "ń", &filetype) call IMAP ('+n', "ň", &filetype) call IMAP ('=o', "ó", &filetype) call IMAP ('+o', "ö", &filetype) call IMAP ('+:', "ô", &filetype) ""call IMAP ('=p', "\\'{p}", &filetype) ""call IMAP ('+p', "\\v{p}", &filetype) ""call IMAP ('=q', "\\'{q}", &filetype) ""call IMAP ('+q', "\\v{q}", &filetype) call IMAP ('=r', "ŕ", &filetype) call IMAP ('+r', "ř", &filetype) call IMAP ('=s', "ś", &filetype) call IMAP ('+s', "š", &filetype) ""call IMAP ('=t', "\\'{t}", &filetype) call IMAP ('+t', "ť", &filetype) call IMAP ('=u', "ú", &filetype) call IMAP ('+u', "ü", &filetype) ""call IMAP ('=v', "\\'{v}", &filetype) ""call IMAP ('+v', "\\v{v}", &filetype) ""call IMAP ('=w', "\\'{w}", &filetype) ""call IMAP ('+w', "\\v{w}", &filetype) ""call IMAP ('=x', "\\'{x}", &filetype) ""call IMAP ('+x', "\\v{x}", &filetype) call IMAP ('=y', "ý", &filetype) ""call IMAP ('+y', "\\v{y}", &filetype) call IMAP ('=z', "ź", &filetype) call IMAP ('+z', "ž", &filetype) call IMAP ('=A', "Á", &filetype) call IMAP ('+A', "Ä", &filetype) ""call IMAP ('=B', "\\'{B}", &filetype) ""call IMAP ('+B', "\\v{B}", &filetype) call IMAP ('=C', "dž", &filetype) call IMAP ('+C', "Č", &filetype) ""call IMAP ('=D', "\\'{D}", &filetype) call IMAP ('+D', "Ď", &filetype) call IMAP ('=E', "É", &filetype) call IMAP ('+E', "Ě", &filetype) ""call IMAP ('=F', "\\'{F}", &filetype) ""call IMAP ('+F', "\\v{F}", &filetype) call IMAP ('=G', "Ǵ", &filetype) call IMAP ('+G', "Ǧ", &filetype) ""call IMAP ('=H', "\\'{H}", &filetype) ""call IMAP ('+H', "\\v{H}", &filetype) call IMAP ('=I', "Í", &filetype) ""call IMAP ('+I', "\\v{I}", &filetype) ""call IMAP ('=J', "\\'{J}", &filetype) ""call IMAP ('+J', "\\v{J}", &filetype) ""call IMAP ('=K', "\\'{K}", &filetype) ""call IMAP ('+K', "\\v{K}", &filetype) call IMAP ('=L', "Å", &filetype) call IMAP ('+L', "Ľ", &filetype) ""call IMAP ('=M', "\\'{M}", &filetype) ""call IMAP ('+M', "\\v{M}", &filetype) call IMAP ('=N', "Ñ", &filetype) call IMAP ('+N', "Ò", &filetype) call IMAP ('=O', "Ó", &filetype) call IMAP ('+O', "Ô", &filetype) ""call IMAP ('=P', "\\'{P}", &filetype) ""call IMAP ('+P', "\\v{P}", &filetype) ""call IMAP ('=Q', "\\'{Q}", &filetype) ""call IMAP ('+Q', "\\v{Q}", &filetype) call IMAP ('=R', "À", &filetype) call IMAP ('+R', "Ø", &filetype) call IMAP ('=S', "Ś", &filetype) call IMAP ('+S', "Š", &filetype) ""call IMAP ('=T', "\\'{T}", &filetype) call IMAP ('+T', "Ť", &filetype) call IMAP ('=U', "Ú", &filetype) call IMAP ('+U', "Ǔ", &filetype) ""call IMAP ('=V', "\\'{V}", &filetype) ""call IMAP ('+V', "\\v{V}", &filetype) ""call IMAP ('=W', "\\'{W}", &filetype) ""call IMAP ('+W', "\\v{W}", &filetype) ""call IMAP ('=X', "\\'{X}", &filetype) ""call IMAP ('+X', "\\v{X}", &filetype) call IMAP ('=Y', "Ý", &filetype) ""call IMAP ('+Y', "\\v{Y}", &filetype) call IMAP ('=Z', "Ź", &filetype) call IMAP ('+Z', "Ž", &filetype) " end WML mappings }}} elseif b:input_method == "utf-8" || \ b:input_method == "UTF-8" || \ b:input_method == "utf8" || \ b:input_method == "UTF8" call Source("~/.vim/modules/diacritics-utf8.vim") endif endif " Modeline {{{ " vim:set ts=4: " vim600:fdm=marker fdl=0 fdc=3 " }}}