Sticky lines
The sticky lines feature pins key structural elements, such as class
or function
declarations, to the top of the editor as you scroll, keeping scopes visible for quick navigation in large files and codebases.
You can also click any of the sticky lines to scroll the editor to the corresponding declaration.
![https://resources.jetbrains.com/help/img/idea/2024.3/ws_sticky_lines.png](https://resources.jetbrains.com/help/img/idea/2024.3/ws_sticky_lines.png)
By default, the maximum number of sticky lines is set to 5.
Right-click the sticky lines in the editor and click Configure Sticky Lines.
Press CtrlAlt0S to open settings and then select Editor | General | Sticky Lines. Next to the Maximum number of lines field, enter the desired number of sticky lines.
![Configure the number of sticky lines Configure the number of sticky lines](https://resources.jetbrains.com/help/img/idea/2024.3/ws_sticky_lines_settings.png)
By default, the Show sticky lines feature is enabled. You can choose to disable the feature for all languages or for specific languages.
Right-click the sticky lines in the editor and click Disable.
Right-click the gutter, select Appearance, and then deselect Show Sticky Lines.
Press CtrlAlt0S to open settings and then select Editor | General | Sticky Lines. Clear the Show sticky lines while scrolling checkbox.
Right-click the sticky lines in the editor and click Disable for <language>. The option will list the language you are currently viewing.
Press CtrlAlt0S to open settings and then select Editor | General | Sticky Lines. In the Languages section, deselect the checkbox next to the language to disable sticky lines for it.
Press CtrlAlt0S to open settings and then select Editor | Color Scheme | General | Editor | Sticky Lines. Edit the color for the background, border, or hovered state.
Thanks for your feedback!