Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add BiDi support to Vim #204

Open
GoogleCodeExporter opened this issue Aug 18, 2015 · 10 comments
Open

Please add BiDi support to Vim #204

GoogleCodeExporter opened this issue Aug 18, 2015 · 10 comments

Comments

@GoogleCodeExporter
Copy link

For those who love using Vim, but need to work in multiple languages at the 
same time, the lack of bi-directional support for working with right-to-left 
languages is a significant drawback.  I understand that this may be difficult 
to implement, but please do consider it as a significant feature for a future 
release of vim and gvim, especially as Unicode use and support is growing in 
popularity.  Thanks for making Vim.

Original issue reported on code.google.com by casey.be...@gmail.com on 9 Mar 2014 at 8:39

@GoogleCodeExporter
Copy link
Author

Did you try?: set rightleft

Original comment by mattn.jp on 10 Mar 2014 at 4:21

@GoogleCodeExporter
Copy link
Author

That is what I'm using, yes.  But notice here:

http://en.wikipedia.org/wiki/Comparison_of_text_editors#Right-to-left_and_bidire
ctional_text

Support for right-to-left text is not the same as bidirectional text support.  
If I have a file with English and Hebrew in the same file, I can only read one 
language at a time, depending on the direction of the text.  Bidirectional 
support would mean that I would be able to read both languages at the same time 
(the text for both languages displays correctly).

I won't pretend to know how this should be implemented, but this article might 
give a bit more detail on how it works:

http://en.wikipedia.org/wiki/Bi-directional_text#Unicode_support

Thanks.

Original comment by casey.be...@gmail.com on 11 Mar 2014 at 12:01

@Xcess
Copy link

Xcess commented Mar 26, 2017

It's really needed. Nearly ALL of modern editors support this feature. +1

@XVilka
Copy link

XVilka commented Sep 27, 2018

I started gathering the summary gist (like I did with true color one) and linked this issue in it https://gist.github.com/XVilka/a0e49e1c65370ba11c17

@tonymec
Copy link

tonymec commented Sep 27, 2018

Full-bidi would IMHO be extremely hard (and therefore error-prone) to implement in Vim, which never was a WYSIWYG text processor but just a plain text editor.

The recommended way to have Vim display full-bidi text is to let the terminal take care of it (which also means running Vim in a bidi-capable terminal and not as gvim). The mlterm terminal can do full-bidi, and Vim is aware of it, but you might have to get its source and compile it yourself: e.g. AFAICT my (openSUSE Linux) distro does not have it in its software repositories.

See also :help 'termbidi'

Best regards,
Tony.

@Houl
Copy link
Contributor

Houl commented Sep 27, 2018

For now, as a workaround, I'd :split (or :vsplit) a window on the same buffer, :set rightleft in the new window and 'scrollbind' in both windows.

@faridcher
Copy link

faridcher commented Mar 28, 2019

neatvi already supports it and it works flawlessly for Persian, Arabic, Hebrew, etc. languages even with a non-BIDI terminal. Can we add neatvi BIDI feature to vim?

The author of neatvi has already released a patch for this issue here but it seems to be neglected!

THere is also a similar request for Nvim project here.

@XVilka
Copy link

XVilka commented Mar 28, 2019

Please note, recently there was created a working group regarding BiDi support in a console:

@XVilka
Copy link

XVilka commented Oct 12, 2019

Note, that with the release of GNOME 3.34 the support of BiDi by @egmontkob is available in Gnome Terminal out of the box, which makes testing/implementing it in the other programs, such as Vim way easier.

@faridcher
Copy link

faridcher commented Feb 4, 2020

I have a problem with Vim in a BiDi supported libvte based terminal like gnome-terminal :

Zero width non-joiner (ZWNJ) shows as the unicode escape (<200c>). A workaround is given below which is not great since it hides the ZWNJ and does not join the persian chars:
https://vi.stackexchange.com/questions/17900/how-to-make-vim-display-zwnj-characters-correctly

The problem is also mentioned below even though it is not relevant to kitty terminal:
kovidgoyal/kitty#1851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants