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.

2 Answers 2

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

2
  • So simple. Thank you.
    – Aventinus
    Oct 8, 2016 at 14:35
  • Oh yeah! Didn't actually use this feature for quite some time (years) until now because was too lazy to figure out how to get line numbers back! #gamechanger #focustime #levelup Jun 18, 2019 at 19:43
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.

4
  • Accepted answer didn't work for me either (it's outdated), yours did. Feb 22, 2020 at 17:37
  • For Mac users, cmd + shft + A
    – anirvan
    Dec 4, 2020 at 2: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, 2021 at 6: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. Jun 24, 2022 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.