CLion 2024.1 Help

Sticky lines

The sticky lines feature pins key structural elements, such as function or class 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.

CLion: Sticky lines in the editor

By default, the maximum number of sticky lines is set to 5.

Configure number of sticky lines

  • Press Ctrl+Alt+S to open settings and then select Editor | General | Appearance.

Next to the Show sticky lines while scrolling checkbox, enter the desired number of sticky lines.

By default, the Show sticky lines feature is enabled.

Disable sticky lines

  • Right-click the sticky lines in the editor and click Disable Sticky Lines.

    Disable sticky lines
  • Right-click the gutter, select Appearance, and then deselect Show Sticky Lines.

  • Press Ctrl+Alt+S to open settings and then select Editor | General | Appearance. Clear the Show sticky lines while scrolling checkbox.

Change sticky lines color settings

  • Press Ctrl+Alt+S to open settings and then select Editor | Color Schemes | General | Editor | Sticky Lines. Edit the color for the background, border, or hovered state.

Last modified: 04 June 2024