Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

gvim doesn't seem to support it out of the box on my Ubuntu lucid.

share|improve this question
gvim does support it with :set rightleft. You should know this setting is per-window. If you use split windows, you can have one Window with rightleft enabled and a second window on the same file/buffer with rightleft disabled. This is supposed to help with mixed RLT/LTR text. – penguin359 Apr 28 '11 at 10:36
up vote 8 down vote accepted

Since you mention Gvim specifically I assume that its the editor your prefer. Gvim/vim does support right-to-left text.

Use the option :set rl or the long form :set rightleft to enable it. You can add this to your .vimrc if you want to always use it.

vim will need to be compiled with the +rightleft option. I'm not 100% sure if Ubuntu does this, but CentOS does. To check I did vim --version | grep +rightleft since vim can display what options it was compiled with.

share|improve this answer
I just fired up vim on Ubuntu 10.10 Maverick and confirmed that the version of gvim packaged there was compiled with right to left support. – Caleb Apr 27 '11 at 19:08
vim/gvim on Ubuntu does. I haven't seen any modern distro that doesn't compile with that option on. – penguin359 Apr 28 '11 at 10:33
Quick followup - how do you set left to right again? – ripper234 Apr 28 '11 at 14:11
:set norl sets it back to left-to-right. – jonescb Apr 28 '11 at 16:44

RTL support in Linux is actually pretty good. As far as I can tell, anything that could be considered a "good text editor" also has RTL support.

I would pick your favorite editor based on other criteria, then if it's not obvious ask how to enable RTL support. If your primary system language is set to a RTL region most things seem to default to it pretty well.

share|improve this answer

Yudit is an editor specifically designed to cope well with “exotic” language and language combinations. This includes advanced support for bidirectional text. On the minus side, it's otherwise rather primitive for an editor.

Emacs's development branch (what is currently known as Emacs 24.0.50.x and will eventually be Emacs 24.1) supports bidirectional text. On Ubuntu, try the emacs-snapshot Install emacs-snapshot package (as this is a development snapshot, you may be better off recompiling a more recent version).

share|improve this answer

Since starting to study Arabic and also having to process it in scripts, etc., I keep trying out new text editors as I encounter them. However, and I'm clearly very opinionated here, Gedit beats them all. Hands-down. With most text editors something isn't just quite right, but with Gedit everything just works the way you'd expect it to. One small gripe is the new auto-disappearing scrollbar, which of course covers the first one or two Arabic letters in line of text starting on the right. On the command line, I use vim alternating between :set rl/:set norl as described above.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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