I want to display line numbers in my Android Studio editors.
I have turned line numbers ON in preferences
Preferences > Editor > Appearance
However, line numbers do not appear.
If I drop down the View menu and look at the Show Line Numbers
option, it is NOT checked.
View > Active Editor > Show Line Numbers
If I check it, line numbers show. However, if I move my cursor to a different character or line, they immediately disappear.
Why is this happening?
How To Show line numbers In Android Studio. File > Settings > Editor > Appearance then click the "Show line numbers" box. Save this answer.
as @pgoggijr said already, this is a problem I was having with IDEAVim as well. however, you don't have to turn vim off. Just use the vim commands
:set nu
and
:set nonu
to toggle line numbers on and off, and these stay :)
Disclaimer: I wrote that doc
I'm assuming that you're using the ideaVim emulator.
There seems to be a bug in the ideaVim plugin that has surfaced in recent versions of Android Studio that makes line numbers disappear once the cursor moves
Turn off the emulator (tools > VIM emulator), and it should be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With