Vim documentation: hebrew (original) (raw)


main help file


Hebrew Language support (options & mapping) for Vim * hebrew*

The supporting 'rightleft' functionality was originally created by Avner Lottem. Ron Aaron is currently helping support these features.

{Vi does not have any of these commands}

All this is only available when the |+rightleft| feature was enabled at compile time.

Introduction Hebrew-specific options are 'hkmap', 'hkmapp' 'keymap'=hebrew and 'aleph'. Hebrew-useful options are 'delcombine', 'allowrevins', 'revins', 'rightleft' and 'rightleftcmd'.

The 'rightleft' mode reverses the display order, so characters are displayed from right to left instead of the usual left to right. This is useful primarily when editing Hebrew or other Middle-Eastern languages. See |rileft.txt| for further details.

Details

Typing backwards

If the 'revins' (reverse insert) option is set, inserting happens backwards. This can be used to type Hebrew. When inserting characters the cursor is not moved and the text moves rightwards. A deletes the character under the cursor. CTRL-W and CTRL-U also work in the opposite direction. , CTRL-W and CTRL-U do not stop at the start of insert or end of line, no matter how the 'backspace' option is set.

There is no reverse replace mode (yet).

If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown in the status line when reverse Insert mode is active.

When the 'allowrevins' option is set, reverse Insert mode can be also entered via CTRL-, which has some extra functionality: First, keyboard mapping is changed according to the window orientation -- if in a left-to-right window, 'revins' is used to enter Hebrew text, so the keyboard changes to Hebrew ('hkmap' is set); if in a right-to-left window, 'revins' is used to enter English text, so the keyboard changes to English ('hkmap' is reset). Second, when exiting 'revins' via CTRL-, the cursor moves to the end of the typed text (if possible).

Pasting when in a rightleft window When cutting text with the mouse and pasting it in a rightleft window the text will be reversed, because the characters come from the cut buffer from the left to the right, while inserted in the file from the right to the left. In order to avoid it, toggle 'revins' (by typing CTRL-? or CTRL-_) before pasting.

Hebrew characters and the 'isprint' variable Sometimes Hebrew character codes are in the non-printable range defined by the 'isprint' variable. For example in the Linux console, the Hebrew font encoding starts from 128, while the default 'isprint' variable is @,161-255. The result is that all Hebrew characters are displayed as ~x. To solve this problem, set isprint=@,128-255.

top - main help file