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.
    • FNActivityF
      FNActivity
      last edited by

      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)

      Mark OlsonM PeterJonesP 2 Replies Last reply Reply Quote 0
      • Mark OlsonM
        Mark Olson @FNActivity
        last edited by

        @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.

        PeterJonesP 1 Reply Last reply Reply Quote 1
        • PeterJonesP PeterJones referenced this topic on
        • PeterJonesP
          PeterJones @FNActivity
          last edited by

          @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
          • PeterJonesP
            PeterJones @Mark Olson
            last edited by

            @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
            • Terry RT Terry R referenced this topic on
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors