How can the direction be automatically from right to left when opening a file?
Is it possible to direction words from right to left (rtl) when opening a text? If this is possible, how should I achieve this goal? (because my writing language is Farsi)
View->Text Direction RTLfrom the main menu should help you at least in principle. I’m having trouble getting it to show my text RTL. I feel like it was working before and now it’s not.
Those menu commands affect every opened tab – because it’s an editor setting, not a file setting.
Notepad++ doesn’t currently remember your LTR/RTL setting, but there is an open feature request.
If you are willing to use a plugin: with the PythonScript plugin, it would only take a couple of lines of code to have PythonScript change the direction every time you load Notepad++: edit PythonScript’s
editor.menuCommand(MENUCOMMAND.EDIT_RTL)and set PythonScript configuration to
AT STARTUPinstead of
LAZY). Restart Notepad++, and it will be defaulted to RTL.
(This discussion is quite similar to part 2 of this later question by a different user; I am cross linking, because readers of this might be interested in new replies in the other discussion, too.)
I’m having trouble getting it to show my text RTL.
If you look through the change history, there have been a few “RTL” changes over the last year or two.
At this point in Notepad++, I believe it only shows RTL with letters from RTL scripts, but things like selections still behave in a RTL way because of the RTL setting. (Type a quick sentence with your normal text input; make sure you’re on RTL mode, and double-click the first word; notice that the last word is selected; now use Ctrl-RightArrow to move the caret in the “right” direction and watch the cursor jump leftwards.) To have RTL make sense, I think you need to use something like Arabic or Hebrew characters.