From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,d76e5b28bd36adc8,start X-Google-Attributes: gid10d4db,public From: Avner Lottem Subject: Vim 3.0 -- Hebrew patch 0.1 Date: 1995/07/22 Message-ID: <3uqodt$6jp@kruuna.helsinki.fi> X-Deja-AN: 106711567 sender: wirzeniu@cc.helsinki.fi followup-to: comp.os.linux.development.apps content-type: text/plain; charset=ISO-8859-1 organization: ? keywords: vi vim language hebrew editor mime-version: 1.0 newsgroups: comp.os.linux.announce This is a very small patch, which enables editing Hebrew files (or other right- to-left languages, such as Arabic), without loosing any functionality of the 'normal' editor. Most of the editor's features can be used in the Hebrew mode. No terminal support (except the Hebrew font itself) needed. Follows the part of the README file and the LSM. README.rlh ----------------------------------------------------------------- Vi IMproved 3.0 Right to Left and Hebrew mapping, patch 0.1 ----------------------------------------------------------- Avner Lottem, lottem@techunix.technion.ac.il, July 1995. Vim is a remarkable editor which is an almost compatible version of the Unix editor vi, written by Bram Moolenaar and others. Many new features have been added: multi level undo, command line history, filename completion, block operations and more. Vim features a reverse insert mode which is activated by Ctrl-B during insert/replace modes, or by setting revins. However, this mode is only useful when entering right-to-left text inside an English oriented file. It is not suitable for editing a right-to-left oriented file, where the characters stored in the file appear on the screen from right to left. This kind of file is most useful when writing Hebrew documents using TeX--XeT, troffh, composing faxes or writing Hebrew memos. The patch is intended for people who edit English files using vi, and would like to use the same editor interface for their Hebrew documents. There was no intention to invent new Hebrew commands, prompts, help files etc. Patch highlights ---------------- + Editing left-to-right files as in the original vim, no change. + Viewing and editing files in right-to-left windows. File orientation is per window, so it is possible to view the same file in right-to-left and left-to-right modes, simultaneously. (This is sometimes useful when editing documents with TeX--XeT.) + Compatibility to the original vim. Almost all features work in right-to-left mode (see Bugs below). + Changing keyboard mapping and reverse insert modes using a single command. + Backing from reverse insert mode to the correct place in the file (if possible). + No special terminal with right-to-left capabilities is required. The right-to-left changes are completely hardware independent. + ALL enhancements depend on a compilation variable, -DRIGHTLEFT, so it is possible to compile vim without this support. + It should be quite easy to adjust this patch to handle other right-to left languages, such as Arabic, by simply changing the keyboard mapping according to the character encoding. Change details -------------- + Variables: + rightleft (rl) sets window orientation to right-to-left. + hkmap (hk) sets keyboard mapping to Hebrew, in insert/replace modes. + Encoding: + Under Unix, ISO 8859-8 encoding (Hebrew letters codes: 224-250). + Under MS DOS, PC encoding (Hebrew letters codes: 128-154). + Command line switches: + 'vim -H file' starts editing a Hebrew file, i.e. rightleft and hkmap are set. + Keyboard: + Ctrl-X in insert/replace modes toggles revins and hkmap as follows: When in rightleft window, revins+nohkmap are toggled, since English will likely be inserted in this case. When in norightleft window, revins+hkmap are toggled, since Hebrew will likely be inserted in this case. Ctrl-X moves the cursor to the end of the typed text, unlike Ctrl-B that leaves the cursor in the same place. + Ctrl-X in command mode only toggles keyboard mapping (see Bugs below). This setting is independent of hkmap variable, which only applies to insert/replace mode. Bugs ---- + Only tested under Linux. + Does not handle Ctrl-A and Ctrl-X commands (add and subtract) correctly when in rightleft window. + Does not support reverse insert and rightleft modes on the command line. However, functionality of the editor is not reduced, because it is possible to enter mappings, abbreviations and searches with Hebrew text, typed from the left to the right on the command line. + Somewhat slower in right-to-left mode, because right-to-left motion is emulated inside vim, not by the controlling terminal. Please send your comments, suggestions and bug reports to: Avner Lottem E-mail: lottem@techunix.technion.ac.il Phone: +972-4-307322 LSM ------------------------------------------------------------------------ Begin3 Title: Vi IMproved 3.0 right to left and Hebrew mapping, patch 0.1 Version: 0.1 Entered-date: 15-July-1995 Description: A patch to vim 3.0 that enables right-to-left oriented documents, like Hebrew, easy switching between Hebrew and English modes, while preserving all features of vim in English mode and most features in Hebrew mode. Keywords: vi vim language hebrew editor Author: lottem@techunix.technion.ac.il (Avner Lottem) Maintained-by: lottem@techunix.technion.ac.il (Avner Lottem) Primary-site: sunsite.unc.edu /pub/Linux/apps/editors/vi/vim3.0-rlh0.1.tgz 10 kB vim3.0-rlh0.1.tgz 1 kB vim3.0-rlh0.1.lsm Alternate-site: Original-site: Platform: Needs vim-3.0.tar.gz, terminal with Hebrew font (see hebxfonts-0.1.tgz). Copying-policy: Free End -- Send comp.os.linux.announce submissions to: linux-announce@news.ornl.gov PLEASE remember a short description of the software.