> To input Georgian characters, you can: zkutch,
> - use a keymap (and create your own if there is no satisfactory one), see
> :help 'keymap'
> :help keymap-file-format
RE: gvim, Unicode, Georgian mxedruli
Here's how I have implemented Georgian mxedruli in gvim. Corrections and suggestions
would be welcome.
For displaying Georgian mxedruli, the DejaVu Sans Mono font has the glyphs (and is a good
general Unicode mono font, suitable for gvim). You will have to install this font (or a similar
Unicode mono font) on Windows wherever you install fonts so that they are visible to gvim.
I assume here that you want to use a keymap, which allows you to type Roman letters,
and simple sequences (bigraphs, trigraphs, etc.) of Roman letters on your keyboard. These
are intercepted by the keymap and turned into mxedruli characters before being entered
into the buffer. You type an unambiguous Roman _transliteration_ of mxedruli, so the keymap
(below) is titled mxedruli-translit_utf-8.vim. This mxedruli-translit_utf-8.vim file should be
installed in your ~/.vim/keymap/ directory (or the equivalent for Windows).
1. You have to tell gvim to use DejaVu Sans Mono (or another Unicode-encoded
mono font that contains the mxedruli glyphs).
2. You want gvim to store/encode text internally in utf-8 (a default encoding of Unicode)
3. You want gvim to save buffers to file in utf-8 and read files in utf-8
4. You want easy ways to activate and de-activate the mxedruli keymap when you type
You do this via commands in your .gvimrc file.
I'm not a Windows user, but something close to the following should work for you.
In your .gvimrc file, add the lines:
if has ("multi_byte") " i.e. compiled for multi_byte, needed for Unicode
if &encoding !~? '^u' " if encoding does not start u or U
if &termencoding=='' " don't clobber keyboard locale
set encoding=utf-8 " how vim should represent text internally
" fileencodings, tried in order when opening an existing file
" fileencoding is the encoding vim will use to write files
echomsg 'Warning: Multibyte support not compiled in.'
set anti guifont="DejaVu Sans Mono:h14
" input sequences to activate the mxedruli keymap
nmap ,m :setlocal keymap=mxedruli-translit_utf-8<Enter>
imap ,m <Esc>:setlocal keymap=mxedruli-translit_utf-8<Enter>a
" toggle keymaps (to previous and back) N.B. <C-^> works only in Insert mode
" and in command-line mode
nmap ,. i<C-^><Esc>
imap ,. <C-^>
cmap ,. <C-^>
" return to the neutral keymap
nmap ,, :setlocal keymap="neutral"<Enter>
imap ,, <Esc>:setlocal keymap="neutral"<Enter>a
" end of additions to .gvimrc
Put the mxedruli-translit_utf-8.vim file (below) in your ~/.vim/keymap/ directory
(or equivalent for Windows).
" Maintainer: Kenneth R. Beesley krbeesley ATT gmail DOTT com
" Created: 2008-09-21
" Last Changed: 2012-01-09
" vim keymap (input method) for entering Georgian mxedruli
" Installation: place this file in ~/.vim/keymap/
" Selection inside gvim
" :setlocal keymap=mxedruli-translit_utf-8
" or, in your .gvimrc file, include the commands
" nmap ,m :setlocal keymap=mxedruli-translit_utf-8<Enter>
" imap ,m <Esc>:setlocal keymap=mxedruli-translit_utf-8<Enter>a
" nmap ,. i<C-^><Esc>
" imap ,. <C-^>
" cmap ,. <C-^>
" nmap ,, :setlocal keymap="neutral"<Enter>
" imap ,, <Esc>:setlocal keymap="neutral"<Enter>a
" so that you can activate the mxedruli input method by typing ,m
" toggle back and forth by typing ,.
" and return to the "neutral" keymap by typing ,,
" this short name is for display in the status line
" change the lCursor color (the color when this keymap is active)
highlight lCursor guifg=NONE guibg=Cyan
q <Char-0x10E7> " no q vs. q' distinction
X <Char-0x10EE> " x and X the same
" literalize with preceding backslash
" (seldom needed)
" literalize the backslash itself
" end of mxedruli-translit_utf-8.vim
With this setup, when you launch gvim, you just need to type
i.e. a comma followed immediately by an m, to activate the
mxedruli keymap. While this mode is active, you just type
a, e, i, o and u to enter the obvious vowels, and (as far as
possible) you type the obvious Roman equivalents for the
consonants. Ejectives are entered with a roman consonant
followed by a single quote: e.g. p', t', k'. See the keymap
above for other mapping details.
for the Unicode code point values.
You can of course modify the keymap to your taste by changing
the input sequences on the left side, as long as each input sequence is unique.
To toggle between the mxedruli keymap and the previous
keymap, just type ,. (i.e. comma followed immediately by
To return to the default/normal keymap, just type
i.e. two commas together.
On 7Jan2012, at 00:42, Tony Mechelynck wrote:
Kenneth R. Beesley, D.Phil.
P.O. Box 540475
North Salt Lake, UT