Quick Markdown navigation/TOC

5 Points

Romain Lafourcade Romain Lafourcade

4 years ago

Prints a first-level TOC of the current markdown buffer. Type :230 to jump to the corresponding heading.

:g/^# /#

Vadym Khokhlov

Vadym Khokhlov 4 years ago

Nice! But this command shows only first-level headers.

The command for all headers is: :g/^#\+ /#

Romain Lafourcade

Romain Lafourcade 4 years ago

@Vadym, yes, the first-level limitation was on purpose.

:g/^#/# would be enough for all headers, by the way.