If I open a new document in Gedit and I type a line in English, followed by a line in Arabic, Gedit is very smart and makes the line in English right-aligned, and it makes the Arabic left-aligned, as you can see in this screenshot:

Screenshot of Gedit, first line says "Hello." and second line says "السلام عليكم."

It's not just fixing the alignment, it's actually changing the direction, so that the full stop at the end appears correctly all the way to the left in the Arabic sentence.

This is quite smart behaviour from Gedit for bidirectionnel text. However, in some cases, I want to turn it off. For example, I'm writing YAML right now, and indentation is important, and it's confusing to have this sudden change in direction.

Is there a way to disable this behaviour?


I'm not sure if there is a way to do it, but why you don't try another editor? Here is different arabic text handling from Atom, SublimeText, and GEdit:


enter image description here


enter image description here


enter image description here

  • 1
    The screenshots don't show when the text gets right-aligned. For example, gEdit right aligns the line when it thinks the line is only Arabic. It also doesn't show when the editor decides to set the direction to left-to-right, this is most obvious when a sentence ends in a full stop: does the full stop show on the right or the left (regardless of how the text is aligned)? Thanks though! – Flimm Mar 16 '16 at 10:38
  • Remove to: from the Arabic line , you see how gedit flip it to the right side. – user.dz Jun 27 '16 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.