The Computer Oracle

Vertical line for the the right margin in Notepad++

Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Book End

--

Chapters
00:00 Question
00:33 Accepted answer (Score 119)
01:29 Answer 2 (Score 37)
01:46 Answer 3 (Score 17)
02:28 Answer 4 (Score 1)
03:56 Thank you

--

Full question
https://superuser.com/questions/185736/v...

Answer 2 links:
[image]: https://i.stack.imgur.com/AHq9j.png

Answer 3 links:
[image]: https://i.stack.imgur.com/R9LNH.png
[image]: https://i.stack.imgur.com/oCwjv.png
[image]: https://i.stack.imgur.com/NFil7.png
[image]: https://i.stack.imgur.com/RPeQi.png
[image]: https://i.stack.imgur.com/gQLRx.png

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#notepad++

#avk47



ACCEPTED ANSWER

Score 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




ANSWER 2

Score 38


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

vertical edge color customizing in Notepad++




ANSWER 3

Score 19


In case you are looking for this option in Notepad++ at ~v8.x

The setting is located near the center of the "Vertical Edge Settings" window under Settings > Preferences > Margin/Border/Edge:

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 72, and a hard limit at 80.

enter image description here

In case you are looking for this option in Notepad++ at ~v7.x

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




ANSWER 4

Score 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)