Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line on the right in Intellij Idea code editor

What is that line on the right in Intellij Idea code editor?

Here you can see the line:

enter image description here

like image 461
Yaroslav Avatar asked Jul 19 '17 12:07

Yaroslav


People also ask

How do I mark a line in IntelliJ?

In the editor, place the caret at a line of code and press F11 . Alternatively, right-click the gutter next to the line of code that you want to bookmark and select Add Bookmark.

How do I hide lines of code in IntelliJ?

I know I can hide the outline lines by going to Editor -> General -> Code Folding and unchecking the "Show code folding outline" box.


2 Answers

That's the right margin. It's telling you roughly how long your lines should be for readability purposes. You can adjust its length in the settings (see the link above), although the default of 80 characters is a widely accepted standard.

Note that if you try to write a line longer than that marker, it may cut the line down and put the remainder on the line below.

like image 55
Carcigenicate Avatar answered Nov 15 '22 06:11

Carcigenicate


The right margin can be toggled in the Editor | Appearance settings:

margin

To change the position of the margin, use the Code Style options:

column

See help for more details. Basically, it's the guide line showing where the wrapping will occur (if enabled for certain code constructions).

like image 30
CrazyCoder Avatar answered Nov 15 '22 08:11

CrazyCoder