GEdit – How to Switch Text Direction in GEdit?

geditrtltext-editor

I want GEdit to show all paragraphs in right-to-left view. I know that it renders paragraphs starting with rtl characters correctly. But I need paragraphs starting with ltr characters also shown as rtl.

Something like vim -F or set: rl command in Vim.n

Best Answer

You can force a paragraph to be RTL by adding Unicode control U+200F RIGHT-TO-LEFT MARK (RLM) to the beginning of the paragraph. Using:

Crtl+Shift+u Then 200f Enter

For easy entry, you may have to customize you keyboard layout. See reference.

There are more Unicode control characters:

  • U+200E LEFT-TO-RIGHT MARK (LRM), To do the reverse on a right-to-left environment.
  • U+061C ARABIC LETTER MARK (ALM), Note: Most users uses RLM instead which is more general and it works for Arabic scripts too.
  • More at Wikipedia: Bidirectional Text.

References: