vim mappings for Hebrew
Avraham Rosenberg
for.avraham at gmail.com
Wed Feb 15 09:31:28 IST 2012
On Tue, Feb 14, 2012 at 05:32:52PM +0000, Tzafrir Cohen wrote:
> On Tue, Feb 14, 2012 at 04:21:06PM +0200, Nadav Har'El wrote:
> > On Tue, Feb 14, 2012, Daniel Shahaf wrote about "Re: vim mappings for Hebrew":
> > > :set keymap=hebrew
> >
> > Indeed. Vim has a very nice feature where it can "emulate" a Hebrew
> > keyboard for editing, i.e., you never have to switch to Hebrew using your
> > normal mechanism, rather you stay in English mode, and just when you
> > edit vim itself will insert Hebrew letters instead of English.
> >
> > I have the following setup (you can put it in ~/.profile in VIMINIT, or
> > in ~/.vimrc):
> >
> > map! <F12> ^[:set invhk invrl^Ma
> > map <F12> :set invhk invrl^M
> >
> > Note the ^M is a carriage return. What these mappings do is that F12,
> > either in command or editing mode, will reverse the hebrew-keymap
> > property (invhk), and reverse the screen direction (invrl).
>
> " For UTF-8
> set al=1488
>
> " The above from Nadav, using printable characters
> map! <F12> <esc>:set invhk invrl<cr>a
> map <F12> :set invhk invrl<cr>
>
>
> >
> > I can then edit and with F12 switch back and forth between editing
> > Hebrew and English, never using the systems keyboard switching
> > (shift-alt, or whatever).
> >
> > BTW, I also have
> > set guifont=heb8x13
> > set guifont=-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-8
>
> Is this still needed?
>
> iso8859-8?
>
> --
> Tzafrir Cohen | tzafrir at jabber.org | VIM is
> http://tzafrir.org.il | | a Mutt's
> tzafrir at cohens.org.il | | best
> tzafrir at debian.org | | friend
Thank you and to Nadav and Daniel for the very prompt and helpful answers.
Both set keymap=hebrew and set al=1488 work beautifully. I wonder what is
the difference between them...In general, I would like to know where from
you got this wealth of information about the editor. Can you recommend some
book?
....I guess Nadav left the mappings concerning iso8859-8 encoded files in
his .vimrc, from the old days. Nowadays it makes more sense to iconv any
occasional iso8859 file to utf8...
Cheers, Avraham
--
Please avoid sending Excel or Powerpoint attachments to this address.
More information about the Linux-il
mailing list