neatvi icon indicating copy to clipboard operation
neatvi copied to clipboard

Support new BiDi standard

Open XVilka opened this issue 6 years ago • 5 comments

There is a BiDi/RTL standardization effort. And it is already supported by VTE library (not yet released though), see https://terminal-wg.pages.freedesktop.org/bidi/implementations.html#vte

See also https://gist.github.com/XVilka/a0e49e1c65370ba11c17 for tracking other terminals and programs.

XVilka avatar Jul 04 '19 11:07 XVilka

After updating my Gnome Terminal with the new BiDi libvte (thanks to @XVilka 's efforts ), neatvi does not render BiDi text correctly anymore. Vim seems to work well if we :set biditerm.

faridcher avatar Sep 30 '19 20:09 faridcher

Farid Cheraghi [email protected] wrote:

After updating my Gnome Terminal with the new BIDI libvte (thanks to @XVilka ), neatvi does not render BIDI text correctly anymore.

Sorry for my delay in answering.

The main issue is that I think a terminal should change neither the position nor the shape of characters on the screen and rendering bidirectional text should be handled by programs that use the terminal and not the terminal itself. A terminal is like a simple shelf on which you put characters; it should not change their order (or shape) on its own. Breaking this assumption by default does not seem a good idea. This may be a convenient feature for some users; in that case I suggest not changing the default behaviour, and adding an option for that instead.

aligrudi avatar Oct 01 '19 12:10 aligrudi

Thanks for the clarification. I really expect BiDi support in the Terminal by default because I personally prefer to use Persian characters for certain filenames or to print an object with Persian chars in R to stdout without having to pipe it to neatvi . I think the best practice is to provide an option at the application level to disable the Terminal BiDi feature.

faridcher avatar Oct 01 '19 16:10 faridcher

Farid Cheraghi @.***> wrote:

Thanks for the clarification. I really expect BIDI support in the terminal by default because I personally prefer to use Persian letters for certain file names; I am quite happy that I do not have to use bicon anymore. I think the best practice is to provide this option at the application level e.g. in the Vim and/or Neatvi. I think the current situation with vim showing BIDI text correctly but not being able to layout the text from "right to left" direction could be easily overcome. Neatvi could also provide the same runtime option IMHO.

I have added the LNPREF macro in conf.h that can be used to disable BiDi in vte-based terminals; the comment of its previous line gives more details.

Nevertheless, I disapprove the proposal.

Thanks, Ali

aligrudi avatar Dec 02 '21 07:12 aligrudi

@aligrudi Thank you very much for the enhancement. I will test it as soon as possible.

faridcher avatar Dec 02 '21 09:12 faridcher

If the proposal is disapproved, should this issue be closed?

lobre avatar Nov 24 '23 07:11 lobre

Loric Brevet @.***> wrote:

If the proposal is disapproved, should this issue be closed?

I think so.

In any case, as mentioned, to use Neatvi in terminals that implement this proposal, NLPREF macro in conf.h can be defined as "\33[8l".

Ali

aligrudi avatar Nov 24 '23 21:11 aligrudi

I cannot close it myself, so I let @XVilka or yourself @aligrudi close it.

lobre avatar Dec 12 '23 13:12 lobre

Loric Brevet @.***> wrote:

I cannot close it myself, so I let @XVilka or yourself @aligrudi close it.

I rarely use the web interface. Is there was a way to do so by replying to an issue (via email).

Thanks, Ali

aligrudi avatar Dec 12 '23 14:12 aligrudi

Hmm. I am not sure issues can be closed by mail.

lobre avatar Dec 12 '23 15:12 lobre

@XVilka, would you be able to close it yourself? Thanks a lot.

lobre avatar Jan 11 '24 08:01 lobre

@XVilka, would you be able to close it yourself? Thanks a lot.

Done.

XVilka avatar Jan 13 '24 13:01 XVilka