• Login
Community
  • Login

How to add left and right margins feature in open text file?

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 2.1k 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.
  • A
    Ado Netok
    last edited by Mar 27, 2021, 10:55 AM

    How to add left and right margins feature in open text file?
    Now, the file open in full screen.

    P 1 Reply Last reply Mar 27, 2021, 6:04 PM Reply Quote 0
    • P
      PeterJones @Ado Netok
      last edited by Mar 27, 2021, 6:04 PM

      @Ado-Netok ,

      The editing pane follows the size of the whole Notepad++ window (or if you have two editing panes side-by-side, they will split it, with you deciding how much goes to each). So changing the window size will change the visible width of the document. Also, if you dock other window panes (like the Project or Workspace panels, or the Function List panel) to the left or the right, that will influence things.

      There is a “border width” setting (in v7.9.2 and newer, it’s in Settings > Preferences > Margins / Border / Edge, and before that was in the Editing tab of the Preferences) which influences the size of the “frame” around the window, but it only goes to about 30px, which I doubt will meet your goals.

      Finally, there are some Scintilla (the underlying editor-pane tool that Notepad++ uses) commands which can influence the visible margins. Notepad++ doesn’t directly expose those. (Often, I would suggest the ExtSettings plugin, since that allows setting other Scintilla preferences. But as far as I can find, it doesn’t support SCI_SETMARGINLEFT/SCI_SETMARGINRIGHT… so I requested it ). But if you install one of the scripting plugins, like PythonScript, you can access those Scintilla commands. My reply from February gives the instructinos for setting the left margin to 30px using editor.setMarginLeft(30); you can do similar for the right margin using editor.setMarginRight(30)
      dcb1d495-b72b-478a-a147-519163210cc2-image.png

      A 2 Replies Last reply Mar 27, 2021, 8:25 PM Reply Quote 1
      • A
        Ado Netok @PeterJones
        last edited by Mar 27, 2021, 8:25 PM

        @PeterJones ,
        Thank you for help.
        It is hard for me to complete it.

        P 1 Reply Last reply Mar 27, 2021, 8:35 PM Reply Quote 0
        • A
          Ado Netok @PeterJones
          last edited by Mar 27, 2021, 8:26 PM

          @PeterJones,
          I may look for another text editor.

          A 1 Reply Last reply Mar 27, 2021, 8:42 PM Reply Quote 0
          • P
            PeterJones @Ado Netok
            last edited by Mar 27, 2021, 8:35 PM

            @Ado-Netok said in How to add left and right margins feature in open text file?:

            It is hard for me to complete it.

            I would disagree. The instructions include:

            1. install a plugin, which should be easy (a couple of clicks)
            2. copy/paste a couple lines from the post I linked into a file in Notepad++
            3. click one option in the plugin
            4. restart Notepad++

            I may look for another text editor.

            You are free to do what you want. But if you give up at that low level of difficuly, I don’t know that you are going to like any editor that can change the viewed margin.

            Good luck.

            1 Reply Last reply Reply Quote 0
            • A
              Alan Kilborn @Ado Netok
              last edited by Mar 27, 2021, 8:42 PM

              @Ado-Netok said in How to add left and right margins feature in open text file?:

              I may look for another text editor.

              There are good reasons to switch text editors.
              How could this possibly be one of them?
              Plus, I don’t know that most are this type of “margin friendly”.
              This is more of a word-processing function.
              Are you sure you don’t want a word-processor instead of a text editor?

              1 Reply Last reply Reply Quote 1
              • N Neko Nekokovic referenced this topic on Sep 20, 2022, 5:29 PM
              3 out of 6
              • First post
                3/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors