Sep 2, 2026 by Michael Sjoberg

A better use for the outline panel

A file outline is nice, but I don't like it. There's something wrong with it, not exactly sure what. Maybe it's just me not utilizing it properly?

Find in file is often faster than scrolling through a list of function names. I can see the use when writing Markdown or such, to keep a list of headers for quick structural overview.

But outside Markdown and the like, why would I really need one? Should I need one?

If files are relatively small, then there's no real use case.

If files are massive, there might be some use case but with aggressive filtering. It could also be faster to use find in file to search for identifiers near the target.

Anyway, I was thinking about alternatives.

Inline bookmarks

I could repurpose the outline panel as a list of in-code bookmarks.

For example,

# !> parser assumes UTF-8 here
# !> performance-sensitive loop

with the tag configurable in the config file.

The new panel would find these tags and list them, providing easy access to specific interesting areas in code. I also think that keeping these tags in-code is better than some other app-side record-keeping structure as they would follow the file.

I can see a use for this as a quick way to jump back and forth in a file. For example, add

# !> first

and then maybe

# !> second

a few thousand lines further down, then this new panel would make it trivially easy to navigate between the two.

This can of course be done by adding a very unique comment to each, and then find in file to navigate, but then I'd have to remember the actual comment string.

Annotations

Find, sort, and list all lines with

// TODO
// FIXME
// NOTE
// MARK

or any other annotation configured by the user.

Bookmarks are arbitrary destinations created in code. Annotations have semantic meaning and can already exist naturally.

Xcode does this with

// MARK

and

// MARK: -

for mark with separator line.

There are probably also extensions for other editors that do something similar to this.

This would likely improve my workflow, as I keep most todos as comments like

// todo : ...

at the top of each file.

An annotation panel would make my todo list visible from anywhere in the file without opening a second copy or jumping to top of file.

Multi-purpose

I could make this a multi-purpose/navigation panel that would show both bookmarks and other tags. Maybe tabbed, or just as a single list with different sections for easy keyboard navigation.

The sections could be configured in the config file. For example, inline bookmarks and code annotations, but it could also list modified lines, Git changes, and what else?

I can see how diagnostics and errors could be useful here, but I don't see a way to implement those without some language-specific tooling.

Maybe the outline panel doesn't need to be an outline at all. It could basically be a list of useful locations in the file.

A list of locations I don't remember, rather than things I can easily find by searching.