18

Like the title suggests, when I use Distraction Free mode in PyCharm or Intellij I cannot see the line numbers, even though I have ticked the "line numbers" box in the settings. Is there a way to make the line numbers appear on Distraction Free mode?

I'm using Linux (Ubuntu) if that helps (I saw a Mac picture where lines were being showed in Distraction Free mode) and my PyCharm version is 2016.2.3.

Elijah Lynn
  • 12,272
  • 10
  • 61
  • 91
Aventinus
  • 1,322
  • 2
  • 15
  • 33

2 Answers2

33

Showing the line numbers is independently configurable in distraction-free mode and regular mode.

While in distraction-free mode right-click somewhere close to the left-side of the editor window to see a short menu which contains the Show Line Numbers option:

enter image description here

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
11

The accepted answer didn't work for me.

You can always use the shortcut: ctrl + shift + A and type in: "line" and the "show line numbers" option will appear in the list. Navigate to it and press enter to turn it on.

Melron
  • 459
  • 4
  • 14
  • Accepted answer didn't work for me either (it's outdated), yours did. – Sebastian Nielsen Feb 22 '20 at 17:37
  • For Mac users, `cmd + shft + A` – anirvan Dec 04 '20 at 02:07
  • 1
    You have to **right click on the left side of the editor** to get that menu (Show line numbers). If you click on the middle of the editor it will show different menu. I am using IntelliJ IDEA 2021.1. – Ryko May 19 '21 at 06:53
  • I can confirm in 2022 that the accepted answer works. There are 2 different menus based on the context of the editor you right-click in. When you click outside the bounds of the editor, the menu containing "line numbers" toggle is there. Also `cmd + shft + A` works on the mac. Hope that adds clarification. – bencodesall Jun 24 '22 at 15:56