Navigate, move, indent and unindent by heading

What if notes had outline management features built around headings? So being able to move headings (and their content) up and down as well as indenting forward and backward (example: changing from heading 2 to heading 3). Hotkeys for all of these commands as well as hotkeys for navigating up and down between headings.

These features could also be part of the Outline plugin.

Some inspiration from Microsoft Word’s “Outline” view:

Related: https://forum.obsidian.md/t/go-to-heading-quick-menu-via-hotkey-support/4201/2

30 Likes

Because the markdown is just text, you can easily select blocks of text and then tab or shift/tab to indent or drag the text up or down.

What do you gain?

I guess you could change the format en-masee, but you could also just do that with custom css.

Doesn’t seem that needed … ?

Regarding the original post … I bet something as simple as a keyboard shortcut or two that let’s you jump up or down to the next heading / sub heading might might that need.

Best
David

2 Likes

@DavidL I don’t think you understand my request. I’m suggesting moving entire sections of content without selecting text. Imagine headings with several paragraphs below that you want to re-order, promote, or demote.

This feature is available in Microsoft Word from either the Navigation Pane or Outline View.

5 Likes

@sam.baron
In addition to the focused heading, will the Indent/Unindent operations be applicable to all Children headings contained within the focused heading? The request says about the “move” only.

All these new operations are best accompanied by keyboard shortcuts.

Yes, that makes sense to me.

Yes absolutely, I’ll update the OP.

3 Likes

BIG +1 on this!

We should be able to select large blocks of text that contain various heading levels and with keyboard shortcuts promote or demote all headings (remove/add #) within the selected text. All non heading lines should be left alone. It should be as easy as selecting blocks of list items and indenting or outdenting.

When a new content hierarchy emerges as I’m composing a large body of text, it’s currently a real pain in the ass to adjust all the headings accordingly. Search and replacing hashes doesn’t work well for this. And even if it did, the process is so much slower than it should be with an editor like Obsidian.

4 Likes

As for Navigating and Moving full sections, we would like keyboard shortcuts that move whatever section the cursor is in collectively as a unit up or down.

When implementing this feature, there is some important hierarchy logic to follow.

One essential detail is that a section that is being moved should naturally contain all of its subsections and move them collectively.

Another essential detail is that the section being moved should never switch places with another section that is of a lower level. Considering this example:

# A1
## A2
### A3
# B1
## B2
### B3

When moving B1 up one position, it should look like this:

# B1
## B2
### B3
# A1
## A2
### A3

Not like this:
(scrambles your content too easily)

# A1
## A2
# B1
## B2
### B3
### A3

However there are plenty of use cases where a subsection would be moved to a different parent section, like this:

# A1
# B1
## B2
### B3
## A2
### A3

Here’s my current workaround. But just because there’s a workaround doesn’t mean the feature isn’t needed :wink: This workaround can be prone to mistakes if you’re not careful.

  1. Enable Settings>Core>Editor>Fold Headings
  2. Fold a section (or sections) you want to shift up or down in your document
  3. Select the folded line(s)
  4. Mouse drag them to the new position (or cut/paste)

This is slightly less error prone than selecting a section and cut/pasting it somewhere else. The folding ensures that you don’t accidentally miss anything in that section.

Note that the “Swap line up” and “Swap line down” commands are problematic for lines that have a folded section. Please add “Swap section up” and “Swap section down” commands in a future release.

5 Likes

-1

I would not like this to happen automatically to my notes. This would not align with my workflow or purpose for notes.

It wouldn’t happen automatically. There would be a hotkey combination to move heading sections around. What are you expecting would happen automatically?

3 Likes

+10. Coming from OneNote, I would love for Obsidian to mimic a full outlining tool as much as possible.

4 Likes

+1

(I would also give it +10, if this were possible… :wink: )

This would be a major step into a good direction, and I don’t think it’s too difficult to implement. The feature could be located in the outline window in the right pane. (That’s how it is done in Zettlr, as far as I remember.) Either as a drag and drop procedure, or with Selection+Shortcuts. You can also get inspiration on that from Mindmapping Apps like the gorgeous browser-based MindMup, where you move nodes by shortcuts as simple as Ctrl-Up and Ctrl-Down.

Greatly looking forward to this, would make my love affair with Obsidian even more persistent. (Actually, not being able to move folded sections / outline items made me leave Visual Studio Code…)

2 Likes

related feature request: Indent outline carries children

+1. This would be great. But note that It would be necessary to think through the scenario of outlines that go more than 6 levels deep, beyond Markdown’s capacity. In Obsidian, 6 #'s will display as a heading, but 7 #'s will not. When I want to go to level 7 in an outline, I just switch to a hierarchical bulleted list. So, level 7 has no #'s, but rather just starts with a hyphen and a space, and level 8 starts with 4 spaces (or a tab character) followed by a hyphen and a space. In fact, I just imported a Word (.docx) outline that had 10 levels (9 outline levels plus body text), and I used PanWriter plus regex find and replace to convert it to 6 heading levels plus 4 bullet levels.

Anyway, I’m not saying that it would necessarily be desirable to convert heading levels 7 and higher to bulleted lists, but it would be one option for dealing with that scenario.

(In Microsoft word, headings simply get converted to body text when indented beyond level 9, which is Microsoft Word’s limit.)

1 Like

The idea of a more useful and clearer outliner seems to be realised in the https://gingkoapp.com/ .

The recipy?

Taking the outline and separate the different levels. It allows you to work on granular level, but keeps you in the big picture at the same time, to navigate and restructure the document. Very ADHD-friendly.

A FR or Plugin-idea?

New thread or maybe its mentioned here already: Outline core plugin - improvement Have a look!

examples:

2 Likes

+1 – would love to have a “swap section” command added, exactly as @goodsignal describes.

3 Likes

+100 to this feature. I was just wondering if this was possible. It would be a great tool to easilly move around ideas in order to compose the final text.

1 Like

You can move heading sections up and down by enabling Settings> Editor > Fold heading. Use the Fold all command to collapse all headings (optional but helpful), then select and drag or cut-paste the folded heading and it will move the whole section. I think there’s also a keyboard shortcut to move lines up and down, which I imagine would work on a selected folded heading. This also works on folded list sections if you activate Folded indents.

Indentation only works for folded list items. If you select a folded heading and indent it, you get a code block. If you don’t select it and add spaces in front of it, it only affects the header.

1 Like

For anyone bumping into this thread

4 Likes

The “move line up” and “move line down” don’t have hotkeys assigned by default, so you’d have to assign ones if you wanted them. (You could also pin them in command palette, add them to a mobile-like toolbar with cMenu, or add them other places with Commander). On mobile I’m not sure if they appear on the toolbar by default but they can be added.

1 Like

I am really with you, this is a big big feature that can improve my workflow, ( there are tons of other things that I love from Microsoft Word that can make obsidian much better tool)

for now what I use which is not the best solution but it works very well is the plugin “Quiet Outliner” it will add a outliner in right panel with some of functionality of Word navigator one of them is easy change of heading position and indent or unindent them