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

Feature request: Disabling bidi support #2252

Closed
hseg opened this issue Jan 4, 2020 · 9 comments · Fixed by #2293
Closed

Feature request: Disabling bidi support #2252

hseg opened this issue Jan 4, 2020 · 9 comments · Fixed by #2293

Comments

@hseg
Copy link

hseg commented Jan 4, 2020

TL;DR: Some applications (e.g. vim) have their own bidi support, which conflicts
with kitty's support. Please offer a way of turning off kitty's bidi support.

Kitty's bidi seems to cut the line into words, shape each word, then place them
in one line left-to-right, whereas vim's bidi just places letters one after the
other in the specified direction.
(Side note: I can't find kitty's behaviour here documented anywhere)

Hence, kitty's bidi works reasonably well for interactive shell use and the
like, where there is a prevailing directionality and the reversed text is
relatively rare. Conversely, vim's bidi works well in longform text where
changes in direction occur in multi-word streaks.

(Hypothetically, if a good bidi algorithm were implemented (e.g.
UAX9), it would deprecate vim's bidi in
some scenarios, but not all – in cases where extra markup exists, such
algorithms would probably get confused by the markup and give wrong results)

However, kitty+vim is broken in this regard – kitty lies to vim about what's
under the cursor, editing longform text written in this zigzag layout is tiring,
and I don't even have the usual vim workaround of opening the file and its
reflection, since then the words are also reflected.

@kovidgoyal
Copy link
Owner

dup of #2109

@hseg
Copy link
Author

hseg commented Jan 5, 2020 via email

@kovidgoyal
Copy link
Owner

There is no bidi supportin kitty at all. What you see if just harfbuzz
reversing rtl text based on unicode code points.

@hseg
Copy link
Author

hseg commented Jan 5, 2020 via email

@kovidgoyal
Copy link
Owner

kovidgoyal commented Jan 5, 2020 via email

@hseg
Copy link
Author

hseg commented Jan 5, 2020 via email

@kovidgoyal
Copy link
Owner

kovidgoyal commented Jan 5, 2020 via email

@hseg
Copy link
Author

hseg commented Jan 5, 2020 via email

@hseg
Copy link
Author

hseg commented Jan 5, 2020 via email

ctrlcctrlv added a commit to ctrlcctrlv/kitty that referenced this issue Jan 17, 2020
ahmedelgabri added a commit to ahmedelgabri/dotfiles that referenced this issue Jan 28, 2020
Kitty doesn't support RTL & the author mentioned a couple of times that
he has no plans to do so, what a bummer. But in 0.16.0 he added this
hack/workaround to force rendering always as LTR which weirdly enough
improved the RTL support at least became tolerable kovidgoyal/kitty#2293 (comment)

More context:

kovidgoyal/kitty#2293
kovidgoyal/kitty#2252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants