On 03/07/09 07:13, Ali Gholami Rudi wrote:
>
> Hi,
>
> "J.A.J. Pater"<[email protected]> wrote:
>> When I open a UTF-text file with right-to-left-text (hebrew in this
>> case) and left-to-right-text (english in this case) in gedit it is
>> rendered OK (rtl is displayed as rtl, ltr is displayed as ltr).
>>
>> But when I open the same file in gvim the right-to-left text (hebrew) is
>> showed as left-to-right text (just as the rest of the file, cq. english).
>>
>> Is there a way to get the same behaviour as in gedit?
>
> As a workaround, I use this function to make editing files with mixed
> rtl and ltr words easier:
>
> " make right to left editing easier
> " replace Mylang and mykeymap
> function! Mylang()
> setlocal keymap=mykeymap rl delcombine
> " use s-tab to switch the direction and keymap
> map<buffer> <s-tab> :let&imi=1-&imi<cr>:setlocal invrl<cr>
.....................:let &l:imi = !&l:imi..........
no need to clobber the global setting
(for 'rl' you properly used :setlocal)
> " the same in insert mode
> imap<buffer> <s-tab> <esc><s-tab>a
> endfunction
> command Mylang call Mylang()
>
> Ali
Best regards,
Tony.
--
The seven eyes of Ningauble the Wizard floated back to his hood
as he reported to Fafhrd: "I have seen much, yet cannot explain all.
The Gray Mouser is exactly twenty-five feet below the deepest cellar in
the palace of Gilpkerio Kistomerces. Even though twenty-four parts in
twenty-five of him are dead, he is alive.
"Now about Lankhmar. She's been invaded, her walls breached
everywhere and desperate fighting is going on in the streets, by a
fierce host which out-numbers Lankhmar's inhabitants by fifty to one --
and equipped with all modern weapons. Yet you can save the city."
"How?" demanded Fafhrd.
Ningauble shrugged. "You're a hero. You should know."
-- Fritz Leiber, from "The Swords of Lankhmar"
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---