Tzafrir Cohen wrote on Tue, Feb 14, 2012 at 17:32:52 +0000:
> 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>
> 

The usual recommendation is to use ^O in insert mode, thus:

  map  <F12>      :set invhk invrl<cr>
  imap <F12> <C-O><F12>

Compared to your code this loses the mapping of <F12> for command-line
mode (:edit, etc), but at the moment I don't recall what's the standard
way to make it apply there too.

_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to