7

I have installed Debian recently (without a GUI) to learn the CLI and C using the LearnCodeTheHardWay tutorials. Its going well, and I feel at this stage I do not need any GUI.

However, one thing I might need is to view, and edit in a right to left language, specifically Arabic using say... nano. Or with sqlite. Is that possible?

EDIT: VIM or EMACS will be fine also. I do not mind the text editor. Also I would like to do this without install X, or any GUI stuff of any sort.

EDIT: By Terminal what I understand is the black window with the $ symbol, which is what you get with the default Debian install. Its using Bash, and I use SSH to remote into it.

  • 1
    The nano editor is by definition minimalistic so I would be really surprised if you could configure it this way. The only editors I'm aware of that can display and edit text from right to left are emacs and vim. – jimmij Nov 13 '14 at 22:44
  • By “terminal”, do you mean the Linux console (i.e. outside X)? I don't think it supports right-to-left. It's an interface to repair the system, not for doing regular work. An editor such as Vim or Emacs should be able to cope, but the available Arabic fonts may be limited. X has advantages even if you only use it to run terminal emulators — and even Vim and Emacs are more comfortable in their own X window. – Gilles Nov 13 '14 at 23:52
  • @Gilles any kind of support, even limited would be good. I am a windows user, so all I do is add a new keyboard (AR) and away I go typing... what would be the steps in debian do at least type an arabic character in vim or emacs? – sprocket12 Nov 14 '14 at 9:06
  • 1
    @Gilles whatever gave you the idea that the console is not for doing regular work? – Wouter Verhelst Mar 22 '17 at 7:23
1

see comparison of text editors , do an intersection between "right-to-left and bidirectional text" and "text shell integration" .


:set lefttoright

for vim . see documentation and this question .

--

emacs generally can autodetect language and do the corresponding layout , on a per paragraph basis . see documentation .

  • 1
    this won't fix right to left support through ssh. also @لَا إِلٰهَ إِلَّا الله is clearly asking for character support, and not switching the cursor to the right. – user104544 Feb 26 '15 at 2:38
0

This worked for me on Ubuntu

sudo apt-get install language-pack-en-base
sudo apt-get install language-pack-ar-base
sudo locale-gen en
sudo locale-gen ar

Then edit (i used vim) /etc/default/locale or /etc/environment to contain just the following

LC_ALL=en_US.UTF-8  
LANG=en_US.UTF-8

Finally

sudo dpkg-reconfigure locales

These steps will give you arabic over an ssh terminal.

  • you don't say what editor programme you use . – 把友情留在无盐 Feb 26 '15 at 1:41
  • updated the answer – user104544 Feb 26 '15 at 1:44

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.