Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use a right to left language in "Sublime Text" editor

I want to use some strings which are in my language (Persian) in "Sublime Text", but the editor does not show them correctly, for example:

it should be:

<title>عنوان صفحه</title> 

but this is how sublime is showing it:

enter image description here

The encoding is set to utf-8. What should I do to fix it?

like image 697
MohammadHossein R Avatar asked Aug 14 '15 08:08

MohammadHossein R


People also ask

How do I change language in sublime?

Click the Plain Text label at the bottom right of the window and select your language. Alternatively, select your language in the menu at View » Syntax, or open your command palette ( Ctrl Shift P ) and type ssjava (equals to Set Syntax: Java ).

How do I view side by side in Sublime Text?

If you want to see more than one document at the same time in Sublime Text 3, you could drag a tab out into a second window. Alternatively, you can split the main window into multiple sub-windows, then click and drag your document tabs into the sub-window you prefer.

What programming language can I use in Sublime Text?

Sublime HQ is a cross-platform text editor used primarily to edit source code. The program supports a variety of different programming languages, such as HTML, SQL, Java, CSS, and Perl.


1 Answers

There is This Plugin But It Does Not Work Properly

https://packagecontrol.io/packages/Bidirectional%20text%20support

added by barlop

Important Note- As comments indicate, this plugin doesn't really work. People have issues copy/pasting from sublime into notepad. It's OK for viewing but that's not much of an answer.

Note, sublime with this plugin might show leters in the correct order but copy/paste in notepad and it might not so try copy/pasting in notepad first before typing a whole load in there. Also this plugin might not move the cursor in a right to left fashion. (i.e. type a letter the cursor when typing in a right to left language should move to the left)

To install,

i've tested this on ST3 portable.

if you go to the tools menu you see there's no bidirectional option

enter image description here

Then if you go here

https://packagecontrol.io/packages/Bidirectional%20text%20support

see it mentions

their github page here

https://github.com/praveenvijayan/Sublime-Text-2-BIDI

Click on Clone/Download then download zip

enter image description here

extract it and Copy the folder to the packages folder.. i.e. open sublime, do preferences..browse packages , and it gives a folder like C:\Users\harvey\Downloads\ST3\Data\Packages Paste the folder there. (maybe it's better to put it in the user subdirectory, I don't know).

Then go to the tools menu and you see bidirectional options like bidirectional text that weren't there before

enter image description here

And while you're at it you may want to install "package control" if it's not already installed. Go to tools..command palette.. type 'package' see if package control appears. Or go to preferences, see if there is package control listed. If not then you don't have 'package control' installed. You can install package control by going to https://packagecontrol.io/ and click install and it gives you some python code in 2 tabs, one for ST2, one for ST3, and you can paste it into your console(view..console). But it's not strictly necessary you can install the bidirectional package without doing that.

like image 56
Kukuluops Avatar answered Nov 08 '22 09:11

Kukuluops