Michael
Michael

Reputation: 112

How to change the font for specific code lines on intellij IDEA?

How to change font size/style on specific code lines on intellij IDEA without changing the overall settings?

Upvotes: 0

Views: 357

Answers (1)

Koyasha
Koyasha

Reputation: 6797

You cannot change font size/style for specific lines, only some formatting settings (right-click on text selection > Show context actions > Adjust code style settings).

You can, however, use bookmarks to highlight various parts of code.

  1. Change the background of bookmarks under File | Settings | Editor | Color Scheme | General:

enter image description here

  1. Set a bookmark on the desired line:

enter image description here

  1. Observe how the line changes color:

enter image description here

After that you can browse through your bookmarks in the Favorites tool window (Alt+2) or the Bookmarks pop-up window (Shift+F11):

enter image description here

Upvotes: 1

Related Questions