How can I permanently enable line numbers in IntelliJ?


How can I permanently enable line numbers in IntelliJ IDEA?

3/27/2018 1:26:14 AM

The question is obviously well answered already, but since IJ 13 you can enable line numbers in 2 seconds flat:

  1. Press shift twice
  2. Type "line number"
  3. The option shows in the menu and press enter to enable/disable.

enter image description here

Et voila ;)


NOT a solution, rather a TEMPORARY solution which only works only for the current editor and current session:

Simply right click on the place where the line-numbers should be, and there you'll see a small menu.

then, mark the "Show Line Numbers" option.

enter image description here

Please note that this only works on a per-file basis, however. Enjoy.


In Intellij 13 the layout has changed, the Settings button can only be found in File -> Settings and not in the toolbars, and from there you follow the same steps: Editor -> Appearance -> Show line numbers, or search for Line numbers in the Settings search input.Intellij Settings search for line numbers


Android Studio 1.3.2 and on, IntelliJ 15 and on

Global configuration

File -> Settings -> Editor -> General -> Appearance -> Show line numbers

enter image description here

Current editor configuration

First way: View -> Active Editor -> Show Line Numbers (this option will only be available if you previously have clicked into a file of the active editor)

Second way: Right click on the small area between the project's structure and the active editor (that is, the one that you can set breakpoints) -> Show Line Numbers. enter image description here


For InteliJ IDEA 11.0 and above
Goto File --> Settings in the Settings window Editor --> Appearance
and tick Show line numbers check box.

enter image description here


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]