105

Does anyone know if Notepad++ can display a vertical line on the right margin to indicated that the text will or will not fit on a printed page? I have looked but I cannot find it. Word wrap does work, but it wraps by my screen width, not by the width of a printed page.

6 Answers 6

121

As you said you do not actually want to print it, you may use the Vertical Edge Settings.

Setting > Preferences > Editing > Vertical Edge Settings > Input column position(s) seperated with space, for example 80 100

Vertical lines would then be shown at the positions specified (e.g. column 80 & column 100).

You can tick Background mode if you prefer highlighted text instead of a line.

(Tested in: Notepad++ v7.8.9)

In version 8.1.3, the above is under:

Settings > Preference > Margins/Border/Edge > Vertical Edge Settings

5
  • 2
    It's still there in v6.8.8 (December, 2015). Jan 28, 2016 at 13:10
  • 3
    Only issue I have with the vertical edge is that Word Wrap doesn't respect it. It would be wonderful to be able to check a box in the editing preferences to get this behavior.
    – KeithS
    Mar 8, 2016 at 16:18
  • @KeithS you are correct. notepad++ doesn't support this feature yet. superuser.com/questions/365225/…
    – wilson
    Mar 10, 2016 at 3:00
  • In newer Notepad++ (7.8.6) the option is named Vertical Edge Settings, and allows to highlight several columns at once.
    – mik
    Jun 8, 2020 at 7:28
  • 3
    Yes, and for completeness, it moved from Editing to Settings > Preferences > Margins/Border/Edge.
    – Palo
    Apr 13, 2021 at 18:43
38

BTW You can also customize the color of that vertical bar here:

vertical edge color customizing in Notepad++

18

In case you are looking for this option in Notepad++ at ~v7.8, the setting is located near the center of the "Vertical Edge Settings" window under Settings > Preferences > Editing:

You can type in one or more numbers (separated by white space) to show one or multiple vertical lines.

In the example below, I have a "warning" line at line 70, and a hard limit at 80. Hope this helps.

enter image description here

1
  • 13
    this section has now moved to Settings > Preferences > Margins/Border/Edge (I am using v8.1.9.2)
    – MeSo2
    Dec 14, 2021 at 19:33
2

this section has now moved to Settings > Preferences > Margins/Border/Edge (I am using v8.1.9.2)

1

To get a vertical line, go to Settings > Preferences > Margins/Border/Edge and type the line width in Vertical Edge Settings as a number:

Vertical Edge Settings screenshot

Background mode modifies the color of the text instead of adding a line:

Background mode screenshot

You can have multiple lines by typing multiple numbers, which makes Background mode impossible though:

multiple edges screenshot

To change the color of the line, go to Settings > Style Configurator. In Language: Global, Style: Edge colour's Foreground colour is what controls this.

style configuration screenshot

This also affects the Background mode:

screenshot of effect of style configuration on the background mode (text on the right of the invisible line has a red background)

(This is as of Notepad++ v8.5.4 Jun 17 2023)

0

I think modern Printers are able to auto adjust words so that can fit in the sheet. So don't worry about margins.

I suggest you use to Microsoft Word for typing documents that you want to print.

EDIT: I couldn't find anything that could provide a vertical margin in Notepad++. But as Workaround for text readability, once the text is written select all the text then press Ctrl + I (shortcut for Split Lines). One Disadvantage is that you have to keep your window size steady i.e don't resize it.

2
  • 1
    I actually do not want to print it, I just want the code to look nice and appear in a readable fashion. Having that line lets me know when to press 'ENTER'. Sep 7, 2010 at 20:37
  • 3
    Split LINES! CTRL+i BRILLIANT. NOTE: First, turn on word-wrap. This doesn't change your document, only the way it 'wraps' on the screen. Next, resize your window-width, select your text, then run this command. It will add new-lines to each line that goes beyond the window width. Sep 17, 2010 at 11:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .