Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

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

    General Discussion
    3
    6
    624
    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.
    • Ado Netok
      Ado Netok last edited by

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

      PeterJones 1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones @Ado Netok last edited by

        @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

        Ado Netok 2 Replies Last reply Reply Quote 1
        • Ado Netok
          Ado Netok @PeterJones last edited by

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

          PeterJones 1 Reply Last reply Reply Quote 0
          • Ado Netok
            Ado Netok @PeterJones last edited by

            @PeterJones,
            I may look for another text editor.

            Alan Kilborn 1 Reply Last reply Reply Quote 0
            • PeterJones
              PeterJones @Ado Netok last edited by

              @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
              • Alan Kilborn
                Alan Kilborn @Ado Netok last edited by

                @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
                • Referenced by  Neko Nekokovic Neko Nekokovic 
                • First post
                  Last post
                Copyright © 2014 NodeBB Forums | Contributors