" " Initialize flag for default Eo NCR character set. " let g:EONCRCS=0 " 0=iksisme, 3=Latin-3, 8=UTF-8 " " Esperanto Latin 3 numeric character references [ :EONCR 3 ] " Or " Esperanto UTF 8 numeric character references [ :EONCR 8 ] " Or " iksisme [ :EONCR 0 ] (the default) " " " In normal mode, mappings overwrite the current character. " In insert mode, mappings insert. " function! EONCRfunction(i) if ( 0 == a:i ) || ( -1 == a:i ) " iksisme, -1 for silently! nnoremap ;^C sCX inoremap ;^C CX nnoremap ;^c scx inoremap ;^c cx nnoremap ;^G sGX inoremap ;^G GX nnoremap ;^g sgx inoremap ;^g gx nnoremap ;^H sHX inoremap ;^H HX nnoremap ;^h shx inoremap ;^h hx nnoremap ;^J sJX inoremap ;^J JX nnoremap ;^j sjx inoremap ;^j jx nnoremap ;^S sSX inoremap ;^S SX nnoremap ;^s ssx inoremap ;^s sx nnoremap ;^U sUX inoremap ;^U UX nnoremap ;^u sux inoremap ;^u ux let g:EONCRCS=0 if ! a:i | echo "Esperanto mappings iksisme." | endif elseif 3 == a:i " Latin-3 nnoremap ;^C sÆ inoremap ;^C Æ nnoremap ;^c sæ inoremap ;^c æ nnoremap ;^G sØ inoremap ;^G Ø nnoremap ;^g sø inoremap ;^g ø nnoremap ;^H s¦ inoremap ;^H ¦ nnoremap ;^h s¶ inoremap ;^h ¶ nnoremap ;^J s¬ inoremap ;^J ¬ nnoremap ;^j s¼ inoremap ;^j ¼ nnoremap ;^S sÞ inoremap ;^S Þ nnoremap ;^s sþ inoremap ;^s þ nnoremap ;^U sÝ inoremap ;^U Ý nnoremap ;^u sý inoremap ;^u ý let g:EONCRCS=3 echo "Esperanto NCR mappings for Latin-3 have been loaded." elseif 8 == a:i " UTF-8 nnoremap ;^C sĈ inoremap ;^C Ĉ nnoremap ;^c sĉ inoremap ;^c ĉ nnoremap ;^G sĜ inoremap ;^G Ĝ nnoremap ;^g sĝ inoremap ;^g ĝ nnoremap ;^H sĤ inoremap ;^H Ĥ nnoremap ;^h sĥ inoremap ;^h ĥ nnoremap ;^J sĴ inoremap ;^J Ĵ nnoremap ;^j sĵ inoremap ;^j ĵ nnoremap ;^S sŜ inoremap ;^S Ŝ nnoremap ;^s sŝ inoremap ;^s ŝ nnoremap ;^U sŬ inoremap ;^U Ŭ nnoremap ;^u sŭ inoremap ;^u ŭ let g:EONCRCS=8 echo "Esperanto NCR mappings for UTF-8 have been loaded." else nnoremap ;^C inoremap ;^C nnoremap ;^c inoremap ;^c nnoremap ;^G inoremap ;^G nnoremap ;^g inoremap ;^g nnoremap ;^H inoremap ;^H nnoremap ;^h inoremap ;^h nnoremap ;^J inoremap ;^J nnoremap ;^j inoremap ;^j nnoremap ;^S inoremap ;^S nnoremap ;^s inoremap ;^s nnoremap ;^U inoremap ;^U nnoremap ;^u inoremap ;^u let g:EONCRCS=0 echo "Usage: EONCR [038]" endif endfunction command! -nargs=1 EONCR call EONCRfunction() EONCR -1