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

Re: Display hide a char ?



Nadim Shaikli <shaikli at yahoo dot com> writes:

>Its not at all similar in the sense that we are not asked to superimpose
>those two glyphs (which is what composing characters tend to do).  So the
>idea is somewhat similar conceptually, but the execution of it is far from
>being the same.  The 'C' in question is a completely different glyph in its
>own right (again this is only to be done on display).  If I'm jumping to
>conclusions, do let me know.

Yes, and for Hebrew likewise, unicode defines some 'combined glyphs' which are
combinations of base-characters and composing characters, for those cases
where it is difficult to do a 'generic' job that looks good.

>> That sounds complicated.  In many places the cell-width of a character
>> is computed and used.  You would need to have a character of zero cell
>> width, which causes all kinds of trouble.
>
>Everything related to Arabic is complicated ;-)

:-!  Much more so than Hebrew, which is complicated enough.  Nadim, do you
know if Farsi has different shaping rules?  I think it might, which may
complicate the innards of vim too.

>OK, let's simplify this and remove the "arabic" notion from any of this.
>
>Let's assume I want to do the following,
>
>  user enters -> "WXYZ"
>  user sees   -> "WYZ"  (note, no X)
>
>certainly that's doable in vim (dynamically, ie. no replace post fact - the
>'X' should simply not be shown and no keyboard/keymap tricks either, I'm
>looking for a vim code solution for this).  What happens now is (with some
>hacking),
>
>  now in vim  -> "W YZ" (note, space)

ergh.  Why can't you use the 'keymap' feature?  Oh, right, because 'X' appears
by itself and so making 'XY' map to 'Y' will make entering a plain 'X' a
problem.

Ron