[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typing hebrew with vim in console
- To: Eran Levy <eranle(at-nospam)netvision.net.il>
- Subject: Re: Typing hebrew with vim in console
- From: "Nadav Har'El" <nyh(at-nospam)math.technion.ac.il>
- Date: Tue, 17 Apr 2001 13:42:03 +0300
- Cc: linux-il(at-nospam)linux.org.il
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Hebrew-Date: 24 Nisan 5761
- In-Reply-To: <5.0.2.1.0.20010417132513.00a2ab70@netvision.net.il>; from eranle@netvision.net.il on Tue, Apr 17, 2001 at 01:30:55PM +0200
- References: <5.0.2.1.0.20010417132513.00a2ab70@netvision.net.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mutt/1.2i
On Tue, Apr 17, 2001, Eran Levy wrote about "Typing hebrew with vim in console":
> Hi,
> I have tried using vim -H and its typing me inverted hebrew and its not
> giving me the right buttons for example if im writing "H" it prints me: "D"
> why?
> I think that I have to Re-map the hebrew keyboard for a console use. But, how?
> I saw the ftp://linux.org.il/pub/Hebrew/vimrc_hebrew script but its for X
> windows and I want to type hebrew into console.
> Can anyone help? Tzafrir? Hetz? someone?
Here's what I use (see ftp://ftp.ivrix.org.il/pub/ivrix/src/cmdline/tex/README)
----------------
Vim's Hebrew support adds two main commands that are relevant to Hebrew LaTeX
editing: ":set hk" sets a Hebrew keymap (so that, for example, typing "a" will
generate a shin). ":set rl" changes the text direction in the window to be
from right to left, so that you can see and write Hebrew text "normally".
The user does not have to type these commands: it is recommended to use a
combination of both, by programming a key (F12, for example). You can do it
by putting the following commands in your ~/.vimrc file:
set allowrevins
map <F12> :set invrl invhk^M
map! <F12> ^O:set invrl invhk^M
cmap <F12> ^_
set guifont=heb8x13
(for those inexperienced with vi: To get ^M type Control-V Control-M. To
get ^O type Control-V Control-O. To get ^_ type Control-V Control-Shift-Minus)
With these definitions, run gvim (or vim in an xterm window started as
'xterm -fn heb8x13') on your Hebrew LaTeX file. The F12 key changes direction
and language, from Hebrew to English and vice versa. You should use that key
whenever you want to switch from typing a LaTeX command to typing Hebrew
text, and vice versa. After a very short adjustment period, this method of
writing turns out comfortable and natural, because while writing text in some
language, the text you write in it is in the proper direction.
The "cmap" definition above allows changing language also in the Vim command
prompt - e.g., for searching (with /) a Hebrew word. In the command prompt
there's currently no way of changing direction, so the word you write will
look Hebrew, but reversed.
----------------
--
Nadav Har'El | Tuesday, Apr 17 2001, 24 Nisan 5761
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Share your knowledge. It's a way to
http://nadav.harel.org.il |achieve immortality.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il