hebrew.txt 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. *hebrew.txt* Nvim
  2. VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
  3. Hebrew Language support (options & mapping) for Vim *hebrew*
  4. The supporting 'rightleft' functionality was originally created by Avner
  5. Lottem. <alottem at gmail dot com> Ron Aaron <ron at ronware dot org> is
  6. currently helping support these features.
  7. Introduction
  8. ------------
  9. Hebrew-specific options are 'hkmap', 'hkmapp' 'keymap'=hebrew and 'aleph'.
  10. Hebrew-useful options are 'delcombine', 'allowrevins', 'revins', 'rightleft'
  11. and 'rightleftcmd'.
  12. The 'rightleft' mode reverses the display order, so characters are displayed
  13. from right to left instead of the usual left to right. This is useful
  14. primarily when editing Hebrew or other Middle-Eastern languages.
  15. See |rileft.txt| for further details.
  16. Details
  17. --------------
  18. + Options:
  19. + 'rightleft' ('rl') sets window orientation to right-to-left. This means
  20. that the logical text 'ABC' will be displayed as 'CBA', and will start
  21. drawing at the right edge of the window, not the left edge.
  22. + 'hkmap' ('hk') sets keyboard mapping to Hebrew, in insert/replace modes.
  23. + 'aleph' ('al'), numeric, holds the decimal code of Aleph, for keyboard
  24. mapping.
  25. + 'hkmapp' ('hkp') sets keyboard mapping to 'phonetic hebrew'
  26. NOTE: these three ('hkmap', 'hkmapp' and 'aleph') are obsolete. You should
  27. use ":set keymap=hebrewp" instead.
  28. + 'delcombine' ('deco'), boolean, if editing UTF-8 encoded Hebrew, allows
  29. one to remove the niqud or te`amim by pressing 'x' on a character (with
  30. associated niqud).
  31. + 'rightleftcmd' ('rlc') makes the command-prompt for searches show up on
  32. the right side. It only takes effect if the window is 'rightleft'.
  33. + Encoding:
  34. + Under Unix, ISO 8859-8 encoding (Hebrew letters codes: 224-250).
  35. + Under MS DOS, PC encoding (Hebrew letters codes: 128-154).
  36. These are defaults, that can be overridden using the 'aleph' option.
  37. + You should prefer using UTF8, as it supports the combining-characters
  38. ('deco' does nothing if UTF8 encoding is not active).
  39. + Vim arguments:
  40. + 'vim -H file' starts editing a Hebrew file, i.e. 'rightleft' and 'hkmap'
  41. are set.
  42. + Keyboard:
  43. + The 'allowrevins' option enables the CTRL-_ command in Insert mode and
  44. in Command-line mode.
  45. + CTRL-_ in insert/replace modes toggles 'revins' and 'hkmap' as follows:
  46. When in rightleft window, 'revins' and 'nohkmap' are toggled, since
  47. English will likely be inserted in this case.
  48. When in norightleft window, 'revins' 'hkmap' are toggled, since Hebrew
  49. will likely be inserted in this case.
  50. CTRL-_ moves the cursor to the end of the typed text.
  51. + CTRL-_ in command mode only toggles keyboard mapping (see Bugs below).
  52. This setting is independent of 'hkmap' option, which only applies to
  53. insert/replace mode.
  54. Note: On some keyboards, CTRL-_ is mapped to CTRL-?.
  55. + Keyboard mapping while 'hkmap' is set (standard Israeli keyboard):
  56. q w e r t y u i o p
  57. / ' ק ר א ט ו ן ם פ
  58. a s d f g h j k l ; '
  59. ש ד ג כ ע י ח ל ך ף ,
  60. z x c v b n m , . /
  61. ז ס ב ה נ מ צ ת ץ .
  62. This is also the keymap when 'keymap=hebrew' is set. The advantage of
  63. 'keymap' is that it works properly when using UTF8, e.g. it inserts the
  64. correct characters; 'hkmap' does not. The 'keymap' keyboard can also
  65. insert niqud and te`amim. To see what those mappings are, look at the
  66. keymap file 'hebrew.vim' etc.
  67. Typing backwards
  68. If the 'revins' (reverse insert) option is set, inserting happens backwards.
  69. This can be used to type Hebrew. When inserting characters the cursor is not
  70. moved and the text moves rightwards. A <BS> deletes the character under the
  71. cursor. CTRL-W and CTRL-U also work in the opposite direction. <BS>, CTRL-W
  72. and CTRL-U do not stop at the start of insert or end of line, no matter how
  73. the 'backspace' option is set.
  74. There is no reverse replace mode (yet).
  75. If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown in the
  76. status line when reverse Insert mode is active.
  77. When the 'allowrevins' option is set, reverse Insert mode can be also entered
  78. via CTRL-_, which has some extra functionality: First, keyboard mapping is
  79. changed according to the window orientation -- if in a left-to-right window,
  80. 'revins' is used to enter Hebrew text, so the keyboard changes to Hebrew
  81. ('hkmap' is set); if in a right-to-left window, 'revins' is used to enter
  82. English text, so the keyboard changes to English ('hkmap' is reset). Second,
  83. when exiting 'revins' via CTRL-_, the cursor moves to the end of the typed
  84. text (if possible).
  85. Pasting when in a rightleft window
  86. ----------------------------------
  87. When cutting text with the mouse and pasting it in a rightleft window
  88. the text will be reversed, because the characters come from the cut buffer
  89. from the left to the right, while inserted in the file from the right to
  90. the left. In order to avoid it, toggle 'revins' (by typing CTRL-? or CTRL-_)
  91. before pasting.
  92. Hebrew characters and the 'isprint' variable
  93. --------------------------------------------
  94. Sometimes Hebrew character codes are in the non-printable range defined by
  95. the 'isprint' variable. For example in the Linux console, the Hebrew font
  96. encoding starts from 128, while the default 'isprint' variable is @,161-255.
  97. The result is that all Hebrew characters are displayed as ~x. To solve this
  98. problem, set isprint=@,128-255.
  99. vim:tw=78:ts=8:noet:ft=help:norl: