ChatGPT解决这个技术问题 Extra ChatGPT

How to make phpstorm display line numbers by default?

How to make phpstorm display line numbers by default? Couldn't find that option. It's kind of annoying to turn them on manually for each page.

you can search on top of the settings pane. just write "line number" and you will find it
I can't believe PhpStorm doesn't have this enabled by default. What developer doesn't want line numbers most of the time? (not really a question) Anyways, good question, thanks!
Yeah, it's actually really annoying that it's not on by default. I'd assume every developer unfamiliar with their product has ended up on this page at some point.
Maybe we are all supposed to get to the point as programmers where our chi "inner energy" helps us see line numbers even when they're not there. Thank you IntelliJ!!!
Other IDE's don't have it enabled by default either, not sure why... Monitor size is generally not exactly that limited these days, and line numbers are used constantly, by me anyways.

s
szaman

Settings (or Preferences if you are on Mac) | Editor | General | Appearance and check Show line numbers.


You can get to settings on Windows with ctrl+alt+s, or file -> settings
PHP 8.0.3 Editor -> General -> Appearance -> Check Show line numbers
Ctrl + Shift + A on Windows lets you search all options. Just hit it and type line numbers and you can enable and disable them.
If you are stuck following, just do a search for "line numbers"
You can use Ctrl + Shift + A and you can find any settings.
p
pleerock

Just now found where is it on Windows. Its View -> Active Editor -> Show Line Numbers (changes only for current document) and File -> Settings -> Editor -> Appearance -> Show Line Numbers (for all documents)

For Mac Version go to PhpStorm -> Preferences in menu. In the preference window go to IDE settings -> Editor -> Appearance -> Show Line Numbers (To change setting for all documents)

OR if you want to quickly set show line number PER CURRENT WINDOW even easier - right click on the long white column (where breakpoints are set) then select Show Line Numbers.

https://i.stack.imgur.com/pHpwn.png

Red dot on the screenshot is a place where you have to click


For version 8.03 on Windows to change it for all documents, it is now under File -> Settings -> Editor -> General -> Appearance -> Show Line Numbers
Works on Linux too
M
Matija

All the guys are right. I am just bringing the the current soultion with the images.

Go to File-> Settings

https://i.stack.imgur.com/nwKvV.jpg

In the box in the top right corner type in line numbers, just below that choose Editor->Appearance, from the right checkboxes, find Show line numbers and check it. After that hit Apply and OK

https://i.stack.imgur.com/D5RXj.jpg

That should do the trick.

My version of PhpStorm is 6.0.3


M
Michel Ayres

If you're on a Mac:

PhpStorm -> Preferences... -> Editor -> Appearance -> Show Line Numbers

https://i.stack.imgur.com/vnjws.png


This is the best answer for MAC! Currently (in PhpStorm 8) I found it in PhpStorm -> Preferences... -> Editor -> Appearance -> General -> Show Line Numbers
T
TV-C-1-5

just double tap 'Shift' and search for 'Line Numbers' and there you will see a toggle option on or off


J
JDGalway

In PHPStorm 8 this setting is no longer under 'Appearance' but now in:

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


I don't find any Appearance under Editor.
You need to open General submenu and then you will find Appearance -> Show line numbers
U
Unni Kris

Follow the below steps:

Click on File->Settings->

In the Settings dialog box Expand Editor under IDE Settings

Click Apperance - > select Show line numbers.

Click Apply->Ok.


Your answer is being automatically shown by Google. puu.sh/lV9s9/e0be334c42.png
Z
Zahid Khurshid Chandio

https://i.stack.imgur.com/4n3Mf.png

Simplest solution for line numbers in php storm..There are many other solutions but i think A big picture a good from 1000 words.


R
Ryan

File -> Settings -> Editor -> General -> Appearance check "Show Line Numbers"

This is the current location as of phpStorm 8.0.2 on Ubuntu 14.04


Thanks It worked for me too. The setting is in the right place that has been stated. However I have to restart my PHPstorm to show the line numbers.
A
Ankur

Settings -> editor | appearance | Show line numbers


It has been moved and now exists here in more recent versions
N
Nasir Ahmed

Just right click on left side where line numbers generally show, select "show line numbers"


This solution has already been provided by @pleerock. Please don't post duplicate answers here.
A
Andrew Koper

In PHPStorm 2016: File > Settings > Editor > General > Appearance > check "Show line numbers"


M
Momin

By typing command + shift + A you will get a search prompt and write line numbers . Now you can trigger button on or off

https://i.imgur.com/e1JYoJp.png


S
Shannon Matthews

For PhpStorm version 9 on Windows.
FileSettingsEditorGeneralAppearence then check Show line numbers


c
croxy

in the top right corner is a search button type show line numbers and you will see a toggle option. this way you never have to do it yourself. :)

https://i.stack.imgur.com/HggvQ.png


k
komu_Mkeya
File->settings->IDE Settings->Editor->Appearance

And just check the "Show line numbers" works with 8.0.1


S
Snowcrash

On the Mac version 8.0.1 has this setting here:

PhpStorm > Preferences > Editor (this is in the second section on the left - i.e. IDE Settings NOT Project Settings) > Appearance > Show line numbers


T
Tai Christian

You should go to: File -> Settings -> Editor -> General -> Appearance -> Show Line Numbers


P
Pang

As of the latest version:

PhpStorm > Preferences.. > Editor > General > Appearance > Show line numbers

https://i.stack.imgur.com/zys9J.png