[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VIM-6 - rightleft redisplay



On Tue, 4 Dec 2001 13:25:36 -0500 (EST)
 "Yousof Mortazavi" <yousof at engsoc dot org> wrote:
> 
> On Tue, 4 Dec 2001, David Harrison Jr. wrote:
> 
> >
> > What about numbers?  Are they drawn in the same direction?  I seem to
> > remember there was one language that had its numbers drawn in the
> > opposite direction from its words, thus making it a combination of
> > "rightleft" and "leftright" type of writing.  If this is the case, then
> > drawing everything in one direction may not be flexible enough, no
> > matter which direction you are drawing.
> 
> Yes, you are right about numbers rendered as left-to-right. This
> whole handling of right-to-left and left-to-right gets pretty
> complicated especially when you start embedding texts from
> left-to-right scripts within right-to-left scripts. It is,
> however, clearly outlined in the Unicode Standard Annex #9:
> "The Bidirectonal Algorithm" available at
>
>         http://www.unicode.org/unicode/reports/tr9/
> 
> As well libraries have been written, the most complete of which
> is "fribidi" available from
>
>         http://fribidi.sourceforge.net
> 
> Noteworthy to say, that implementing BiDi for Vim will ease the
> implementation of right-to-left scripts such as Arabic and
> Hebrew.

And other languages as well.

> Here I'd like to propose a "BiDi" mode in Vim (just as the
> current RL mode) that when active, characters entered get
> shuffled according to the BiDi Algorithm as described by the
> Unicode Standard. This mode should of course coexist with the
> current RL mode such that when this mode is active, the base
> direction is right-to-left, nevertheless, characters that possess
> left-to-right behaviour are rendered as such.
> 
> I would like to work on this project in conjunction with any
> group that feels the need for proper Bidirectional behaviour. It
> is, after all, part of the Unicode Standard, and the current
> Unicode implementation of Vim would be incomplete without it.

I agree with you 100% -- Bidi is a MUST for any right-to-left
language, as you note above, if one were to intermix languages.
I would like to stress, though, that Bidi is an ambitious plan
that will undoubtedly mean lots of code change (do you have an
estimate of the work required ?).  As such, I hope that shaping
will not take a back-seat since its almost complete and requires,
as far as we can see, a potential fix/enhancement.  Shaping, like
Bidi, is also required by most (if not all) right-left languages
(Arabic, Hebrew, Farsi, etc).

I am glad to see that both Bidi and Shaping are finally being looked
into seriously in regards to VIM.

> Bram, do you approve?

 - Nadim


__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com