Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn on line numbers permanently in IntelliJ 14? [duplicate]

How do I permanently turn on line numbers in IntelliJ IDEA 14? This post is outdated: how-can-i-permanently-have-line-numbers-in-intellij

like image 378
JBaczuk Avatar asked Nov 20 '14 05:11

JBaczuk


People also ask

How to Copy code with line numbers IntelliJ?

Just assign a shortcut to Copy with Line Numbers action (Ctrl+Shift+A, search, Alt+Enter).

How to turn on line numbers in java?

Open any Java source file in any project and right click on the left bar in the code window. In the pop-up window which opens up, click on the option, Show Line Numbers.

How to Show line number in JCreator?

Run JCreator, select Configure/Options, then select Editor/Java, then... Also, be sure the "show line numbers" box is selected.


3 Answers

Permanently (Ubuntu):

File > Settings > Editor > General > Appearance > Show Line Numbers

enter image description here

For just the current editor: View > Active Editor > Show Line Numbers

enter image description here

like image 105
JBaczuk Avatar answered Oct 14 '22 00:10

JBaczuk


You can do it even faster, using the Search Everywhere tool (press Shift twice): type "Show Line Numbers" (or even "line") and the top hit is the switch for permanent line numbers. Enable Line Numbers

There are 2 switches for line numbers, one that has a On/Off switch and works globally, and one without the switch - for the current file. And one more for the Active Editor (current file).

enter image description here

like image 35
Radu Bompa Avatar answered Oct 13 '22 23:10

Radu Bompa


Go to Settings/Editor/General/Appearance and enable Show line numbers to permanently show line numbers for all editors.

The solution with View > Active Editor > Show Line Numbers seems to work only for the active editor (when you close the current tab or open a new file you have to enable it again).

like image 4
Bohuslav Burghardt Avatar answered Oct 14 '22 00:10

Bohuslav Burghardt