How to add left and right margins feature in open text file?
-
How to add left and right margins feature in open text file?
Now, the file open in full screen. -
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 usingeditor.setMarginRight(30)
-
@PeterJones ,
Thank you for help.
It is hard for me to complete it. -
@PeterJones,
I may look for another text editor. -
@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:
- install a plugin, which should be easy (a couple of clicks)
- copy/paste a couple lines from the post I linked into a file in Notepad++
- click one option in the plugin
- 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.
-
@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? -