• Login
Community
  • Login

How can the direction be automatically from right to left when opening a file?

Scheduled Pinned Locked Moved General Discussion
4 Posts 3 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    FNActivity
    last edited by Jun 23, 2023, 10:19 PM

    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)

    M P 2 Replies Last reply Jun 24, 2023, 1:00 AM Reply Quote 0
    • M
      Mark Olson @FNActivity
      last edited by Jun 24, 2023, 1:00 AM

      @FNActivity
      See https://npp-user-manual.org/docs/views/#text-direction

      View->Text Direction RTL from 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.

      P 1 Reply Last reply Jun 26, 2023, 8:14 PM Reply Quote 1
      • P PeterJones referenced this topic on Jun 26, 2023, 8:01 PM
      • P
        PeterJones @FNActivity
        last edited by Jun 26, 2023, 8:02 PM

        @FNActivity ,

        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 startup.py to run editor.menuCommand(MENUCOMMAND.EDIT_RTL) and set PythonScript configuration to AT STARTUP instead 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.)

        1 Reply Last reply Reply Quote 1
        • P
          PeterJones @Mark Olson
          last edited by Jun 26, 2023, 8:14 PM

          @Mark-Olson said in How can the direction be automatically from right to left when opening a file?:

          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.

          1 Reply Last reply Reply Quote 1
          • T Terry R referenced this topic on Aug 22, 2023, 9:42 AM
          4 out of 4
          • First post
            4/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors