How to write Arabic in Sublime Text 2

Sublime Text although my favorite editor still lacks support for Arabic characters! even with its latest version Sublime Text 3.

I hope they consider adding the support for Arabic characters on their priority list.

Anyway this did not put me off from using it, because am on Windows and I hate Notepad ++.

So a few days back I needed to write a very little web app which converts a number to its word representation in Arabic.

So needed to display Arabic characters on the browser. When I write the Arabic strings in my code they don’t display correctly, they are like disconnected…but of course when I run the app on the browser the font displays correctly.

Am not the only one, there a programmer who already  left a message on the sublime text forum but still did not get a reply. And am sure there are many who probably decided to quit Sublime Text for the same reason.

Now it is highly requested feature, go here to vote up the request.

Hoping Sublime text team works on that in their future version of Sublime Text. While they do that, the solution is available,  I found one plugin created by a non Arabic guy! Isn’t that so generous! Here is the project on github

I would recommend you use the font “courier new” instead of his example of using “arial”. “courier new” is good for code and supports Arabic.

Advertisements

5 responses to “How to write Arabic in Sublime Text 2

  1. Ahmed

    Hi,
    I got interested in your post, I know its been so long but the link for download and installation is not working, Do you have an updated link for that.
    Thank you

    • Hello Ahmed,
      I have updated the link, thanks for notifying me.
      It is a github project at https://github.com/imdark/Sublime-Text-2-BIDI
      And it works well on sublime text 3
      Enjoy.

      • Ahmed

        Hi,
        Thank you for your quick response.

        I downloaded the installed the package and set the font to arial
        (I also solved the disabled menu problem by copying the file unicodedata.pyd to C:\Users\USERNAME\AppData\Roaming\Sublime Text 2 and now the menu is enabled not grayed out).

        However pressing ctr+b or clicking the menu (Bidirectional Text) dose not work or show proper arabic.

        I am not sure what the problem is,
        I am using Sublime-Text 2, is it the only working on version 3 or is it really working on version 2 as you mentioned in the post?

        any help is really appreciated.

  2. To be frank, I have tried only on Sublime Text 3 now with the latest project, maybe the older version was working on Sublime Text 2 and the current one is not.
    I cannot test on Sublime Text 2 now, so sorry about that. Which may also mean I have to update the title of this post to Sublime Text 3 instead of 2.
    Sublime Text 3, though in beta, it is working fine for me, would you consider upgrading yet? or you prefer not?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: