Line numbers - Toolbar button?

I am curious if it is possible to customize the IntelliJ toolbar to add a button which would toggle line numbers on or off.
That would be a very helpful feature for me since its a lot of work to constantly do Settings (toolbar btn) --> Editor --> Appearance --> check: Show line numbers --> OK.

I don't like to leave them on because I feel they take up a little too much space, but it would be nice to have a quick toggle switch.

6 comments
Comment actions Permalink

Hi,

You can add the "Show line numbers" setting as button on the main toolbar. In my experience, you have to restart IDEA to get the icon to show up, and there's no icon specifically for that command, so you get the default, some sort of Martian with very big ears or something. Also, it affects the current edit buffer only, not the UI as a whole.


Randall Schulz

0
Comment actions Permalink

Okay thanks. I actually didn't know that was possible, and now just tried (with success).

Basically:
Right click on toolbar --> Customize menus and toolbars... --> Main toolbar --> Add after... (btn) --> Editor actions --> Show line numbers

It's nice that it allows for you to change the icon as well.
I guess the alien represents a foreign/not native (user defined) toolbar action.

0
Comment actions Permalink

did you try the right click on area left to your code ;) ?



0
Comment actions Permalink

You can toogle line nubers without using the mouse as well: Ctrl + Shift + A > type "num" > Enter

0
Comment actions Permalink

The fastest way is to use Quick Lists (IDE Settings->Quick Lists)

0
Comment actions Permalink

I think right cliciking is the best


0

Please sign in to leave a comment.