Sublime Forum

RTL Support?

#21

This comes up frequently, and the authors’ answer has always been the same: while clearly there is demand for RTL support, adding it would require basically rewriting the text engine. While that may happen eventually, there are no concrete plans to do so at this point.

Several people have speculated that rewriting the text engine might become a priority now that 3.0 is officially released. As far as I know, the authors have not confirmed this. “Not now” doesn’t necessarily mean “later”. While I am hopeful that features like RTL and ligature support may come in a future release, if you absolutely need RTL support now or in the near future I don’t think it makes sense to wait on an implementation in Sublime, because it is not certain when or even if that will happen.

If the authors have said anything that goes beyond what I’ve written here, I’d very much like to hear it myself.

3 Likes

#22

DEV BUILD 3149
DEV BUILD 3148
DEV BUILD 3147
DEV BUILD 3144
3.0 (BUILD 3143)

and rtl not support ! :triumph:

0 Likes

#23

The recent builds are about font rendering but not text layout. Two totally different things.

0 Likes

#24

What kind of features are generally requested by RTL users, that they find in VS Code?

0 Likes

#25

in arabic we write from right to left like this :

> مرحبا

0 Likes

#26

This I know. I’m asking what kind of things you would like Sublime Text to do. Because if all you want is a command that works in the same line, where LTR and RTL text is mixed, it’s easy to do with a plugin. If instead you want something that works in all lines and also contemplates new lines as in a word processor, that would be more complicated, still doable I think, but I wouldn’t spend time on it since I’m not a RTL user.

0 Likes

#27

Don’t think it’s so easy. Just try to copy the text snippet above into ST and try to move chars around. It’s nothing else then pain. The characters are not correctly selected, the cursor jumps to wrong places, etc.

0 Likes

#28

Actually I already tried to do something of this kind when I read of this request, I stopped because I was pushing it too far and it wasn’t working well, but for simple stuff I had some success. What I was doing was to ‘enter RTL mode’ applying a setting to the view, also with a status bar message while active, and while this setting is true every time you enter a char the cursor moves left, so it’s brought in front of it. Only if you start pasting stuff it gets messy, enter/tab need special adjustments etc, but it’s not impossible.

After I finish the stuff I’m doing I’ll post what I could do with RTL.

0 Likes

#29

This is what I could do, you can tell me if it works for you.

https://gist.github.com/mg979/b5a373bee150377e1495163afb2e0990

You have to create a package, that is a directory in the packages folder, create three files with those names and paste the content.

It’s activated with ctrl+shift+alt+r. I didn’t test it much with multiple cursors. One problem is that I could not alter the behaviour of the spacebar key. If you want to delete a selection while in rtl mode, use backspace or delete, not space.

For tab key, it inserts tabs after the cursor, press ctrl+tab if you want a normal advancing tab instead.
Add-line(ctrl+enter) works as normal, “enter” works differently, but I didn’t test it much.

Whenever a view is deactivated, rtl is also deactivated, so you have to enable again if you lose focus.

0 Likes

#30

Good Job Man , but still not fixed 100%

After package:

Still neet To Solving the problem of cutting letters
to be like this
> مرحبا

0 Likes

#31

By cutting letters you mean that letters aren’t rendered well? That seems more like a font problem to me. Try this:

Preferences -> Settings

Then add:

"font_options":
[
	"directwrite"
],
"theme_font_options":
[
	"directwrite"
],

If it still doesn’t work, make a search on Google for monospace font arabic and find a good font. I don’t think I can do anything about that.

0 Likes

#32

tried many fonts but still same problem " (

0 Likes

#33

look to brackets :frowning:

0 Likes

#34

I have no idea what’s written there so I can’t help you. Anyway if it’s only a rendering problem, it shouldn’t matter much because when you use the text outside of Sublime Text it should be ok. Is it better in other editors with monospace font? Maybe it’s only the way those characters look with a monospace font.

Try in Preferences:

"font_face": "Arial",

or the font you use in other programs(MS Word or else), see if the problem is for monospace fonts only.

0 Likes