sponsor Vim development Vim logo Vim Book Ad

greek_polytonic.vim : Keymap for the typing of traditional multi-accented (polytonic) Greek

 script karma  Rating 61/21, Downloaded by 1033  Comments, bugs, improvements  Vim wiki

created by
Andreas Proteus
script type
This is a keyboard layout useful to native Greek speakers and Greek
scholars (Hellenists) who wish to use Vim/gVim to type traditional Greek
(often referred to as multi-accented or polytonic).

This layout allows the typing of multi-accented (polytonic) Greek
text in the manner of writing by hand.  Accents and breathings are typed
after the vowels in any order without dead keys. In other words, first we
type the letter and then we "decorate" it with the required accents.  This
serves for a more comfortable typing of Greek.  Furthermore it allows easier
correction of errors. A wrong accent (or no accent) can be replaced with
with the correct one without deleting the character.  We simply place the
cursor to the right of the vowel and press the required accent.  If the
character can take the accent, it will be replaced by the accented version
of the same character.
The main accent keys are as follows:

/              Oxia (acute)
\              Varia (grave)
~ (or =)   Perispomeni (circumflex)
]               Psili  (lenis)
[               Dasia (asper)
"               Dialytika (diaeresis)
|               Ypogegrammeni (Iota subscript)

Typing the sequence:    a/, will give Small Alpha with Oxia.
Typing:  a/]  or  a]/   will give Small Alpha with Oxia and Psili.
Typing:  a, followed by any combination of /,],|, will give
              Small Alpha with Oxia and Psili and Ypogegrammeni.

Typing of multi-accented Greek is easier this way because this method is
similar to the way we write by hand.  Only a few accent keys are used
(easier to memorize). See the included table. Also read the source file.

You can still use the dead keys of the modern Greek keymap. For example,
Alpha with Tonos can be derived either with "a/" or with ";a".


  Copy the file greek_polytonic.vim to your home .vim  keymap directory
  (~/.vim/keymap/) If the directory does not exist, create it.


  * Load the keymap:
              set keymap=greek_polytonic
  * Set encodings:  
              set encoding=utf-8
              set inputenc=utf-8
              set fenc=utf-8

  * Set vim to use a monospaced unicode font that includes all the "Greek Extented" characters and symbols.
     Example: set guifont=Consolas\ Regular\ 16
     Note: for m$ windows this should be:  set guifont=Consolas:h16

  Examples of suitable fonts are:

    Dejavu Sans mono
    Courier New
    Bitstream Vera Sans Mono

* Also switch the keyboard to Greek with ALT-SHIFT (or whatever)

* To type any of the actual symbols of the accent keys (/, \, ] , [, .. etc.,)  
   you can toggle off the keymap with CTRL-^. When this keymap is active
   the word <Polytonic> appears on the far right of the status bar.

*  Search for polytonic text from the search window.
   To open search window type: q/

*  To Search/Replace or type other commands that involve arguments
   in polytonic text invoke the command window by typing q:
   There you can either type or copy/paste polytonic text.  


   Consolas is a Microsoft font found in Windows 7 (The Consolas font shipped
   with Windows Vista is not suitable - has no extended Greek characters). It
   is a very good monospaced font for displaying and for printing polytonic
   Greek text.  (Microsoft is very good to us Greek scholars).
   Edit: Lately the open source font DejaVu Sans Mono has become better
   than Consolas,  both for displaying and printing polytonic Greek text.

   Here is a screenshot of vim editing the text of Homer's Iliad
   displayed in 16pt DejaVu Sans Mono. The colour scheme is biogoo:

   If you have problems with printing greek utf-8 from vim,
   use paps (http://paps.sourceforge.net/)
   I use it from within vim by creating a command as folows:
   :command Paps write !paps --font=Consolas\ 10 | lpr

   For polytonic Greek spell checking see vimscript#3388.
   Below are the settings I use in my .vimrc file so I can type and
   spellcheck polytonic Greek:

   set guifont=Monospace\ Regular\ 16
   set encoding=utf-8
   set fenc=utf-8
   set keymap=greek_polytonic
   set spelllang=polytonic,en      
   set spellsuggest=10
   set spell

  Note: In my system 'Monospace' is aliased to the font DejaVu Sans Mono.  

install details
Unzip contents.

Copy the file greek_polytonic.vim to your home .vim keymap directory
  (~/.vim/keymap/).  If the directory does not exist, create it.

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
greek-polytonic-keymap-1.2.tar.gz 1.2 2012-08-15 7.0 Andreas Proteus When keymap is active display keymap name in status bar.
greek-polytonic-keymap-1.1.tar.gz 1.1 2010-10-08 7.0 Andreas Proteus Prefer symbols in the range UCS 0370 - 03FF when available.
i.e. all (vowel + oxia) symbols are represented
by their equivalent, identical in apearance (vowel + tonos).
This simplifies find/replace and spell checking.
greek-polytonic-keymap.tar.gz 1.0 2009-08-17 7.0 Andreas Proteus Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.