Outline Mode: Intelligent Numbered Lists and Tab/Shift-Tab Indenting/Outdenting

I love to outline. It is a very quick efficient way to write quick organized thoughts.

Unfortunately, Drafts seems to handle outlining differently from the way that traditional writing apps like Word/Pages handle outlining. I understand that this is on purpose as Drafts is a different kind of text editor but still I think this is a missed opportunity.

First I’ll talk about how many other apps handle outlining, why it’s powerful, and how it could still fit in Drafts without sacrificing Drafts core identity.

Other apps allow you to quickly add a bullet by simply typing * followed by space, or start a numbered list by typing 1. followed by space. They even automatically add a new bullet on the next line when you press return, or the next number on the line when you press return. [Drafts does all of these things great. However, I don’t think Drafts does numbered lists for roman numerals automatically.]

Also on other apps, when you are editing a bulleted list, and you press Tab, it will indent the whole line and update the bullet to match other bullets on that indent level. Also, if editing a numbered list, it will indent the line AND intelligently update the number to match the hierarchy of the numbered list. For example indenting the third line in this numbered list:

  1. red
  2. orange
  3. yellow
  4. green

will auto update the list to look like this:

  1. red
  2. orange
    1. yellow
  3. green

Notice yellow automatically changed to 1. and green automatically changed to 3. Similarly Shift-Tab will outdent and will also intelligently update the numbering to match the outline structure. In a few seconds, the user can easily and quickly write out a complex hierarchy in outline format without having to click through a single menu. [Drafts doesn’t seem to have this Tab indenting feature, nor the intelligent numbering feature.]

These are powerful features that I use ALL the time and are a huge part of how I think. They are also standard in many text editing apps (even Notes), however there is a drawback: they remove your ability to type the literal “Tab” character as explained here. Fair enough.

However I think there is a way to add in this functionality without permanently removing the literal “Tab” character. How about “Outline Mode”?

Outline mode could be a simple toggle mode button on the bottom of the screen right next to the “Link Mode” button. Just like how link mode disables editing while it is on, “Outline Mode” could disable literal "Tab"s. Instead of typing Tab, the Tab button would use the “Indent” action and Shift-Tab would use the “Outdent” action.

If someone wants to type literal “Tab” they simply turn off “Outline Mode”.

Intelligent numbered lists would simply be on by default and always update numbering in the background (even updating if the order is changed in arrange mode). However, if intelligent numbering becomes a problem for someone (for example coders) then intelligent numbering could easily be toggled off in the settings.

Lastly, intelligent numbering wouldn’t have to conflict with Markdown. These are all features supported by Markdown and HTML.

Hopefully this feature request would be helpful for others as well. Please send me your feedback.

7 Likes

It is partially available in the active version of drafts.

Only one thing is missing, but might be implemented by an scripted action (renumbering if lists)

Markdown text entry (like in drafts) is a bit different than rich text based apps.

The diferent lists are:

  • simple list with -
  • todo item with - [ ]
  • numbered lists with 1.

All list support the function to press enter once and get the prefix on the next line.

If the prefix is set there are keyboard actions to indent and unindent lines (they are on the keyboard basic action list)

Drafts even counts the numbers upwards.

The only thing is that renumbering of list is not in the core module of drafts.

This is in a way by design. Markdown parsers implement a renumbering on processing.

So if you process your draft to look nice. the counters will be fine.

One the first glimpse that seems to be silly but if you think about it you do not need numbers during outline mode and they distract me from free thinking.

Do not forget rearranging lines (this is done line by line in drafts)

Some markdown parsers and the big brother asciidoctor define numbered lists generic with #. or 0.

If the prefix is set there are keyboard actions to indent and unindent lines (they are on the keyboard basic action list)

On keyboard this would require pressing Command-] instead of Tab. Ideally, I’d love to use Tab/Shift-Tab, just because it’s already muscle memory but I can live with it if that is not an option.

The only thing is that renumbering of list is not in the core module of drafts.
This is in a way by design. Markdown parsers implement a renumbering on processing.

Interesting. I didn’t know that Markdown parsers renumber upon processing but that makes sense. Still, I think that is all the more reason to renumber dynamically within Drafts. If users write Markdown in Drafts, and the Markdown parser will likely renumber upon processing, then it would be better to renumber within Drafts so that Drafts can maintain its WYSIWYG philosophy. Otherwise, Markdown users may experience confusing results upon importing their Markdown into a parser.

Perhaps, this approach might create compatibility issues that I’m unaware of. Idk.

One the first glimpse that seems to be silly but if you think about it you do not need numbers during outline mode and they distract me from free thinking.

Agreed. Numbers, can be distracting. But in the right situation they can actually make outlines far more readable. Anyone who’s read a Reddit comment thread can see how incredibly confusing an extremely deep outline thread can be. Numbers can assist with readability by giving the reader another way to see the hierarchy rather than just indentation.

In short, while not everyone may like it or need it, numbered lists are still an extremely useful feature built into basic HTML and Markdown and as such they deserve attention.

3 Likes

If we’re trying to add general outliner capabilities to Drafts (which I would welcome), there’s also this to consider:

If I have

  • Fred
  • Sue
    • Dave
      • Joe
  • Sam
  • Ann

And I indent “Sue”, I might want

  • Fred
    • Sue
    • Dave
      • Joe
  • Sam
  • Ann

But in my experience, the default behavior in an outliner would give me my (usually preferred) result

  • Fred
    • Sue
      • Dave
        • Joe
  • Sam
  • Ann

That is, indenting the entire block under the designated line. The current Indent/Outdent actions do not have this capability.

1 Like

did you consider, that Mind Note is a perfect brainstorming and outlining tool?

It easy super easy to share data between this apps.
Have you tried it?

1 Like

+1 on MindNode integration! The ability to round-trip MultiMarkdown files between MindNode and Drafts (and others in my tool chain like Multimarkdown Composer and Marked) has been a major productivity boost for both writing assignments and presentation preparation.

This interoperability is one of the reasons we should be very careful to maintain strict Markdown and Multimarkdown comparability when those modes are set. This needs to include multi-level numbering and bullets when indenting. It’s worth taking a look at the CommonMark tab handling syntax - it’s pretty much the closest thing we have to a Markdown standard.

2 Likes

It is so sad that commonmark is not taking off faster.

We switched to asciidoctor for our complexed documentation.

2 Likes

Getting way off topic, but my organization implemented a GitLab CI/CD pipeline for publishing document written in AsciiDoc. Markdown is definitely easier to start writing, but you need AsciiDoc power for complex documents.

If I had to pick one thing that Markdown needs, it is a widely-accepted transclude syntax.

@DandyLyons sorry for the cross talk.

But … well no but here.

We could move our cross talk to another thread.

1 Like

@DaveEmme raises yet another really good point of why outlining can be so powerful. I also prefer when all the children branches also get indented as well.

@Andreas_Haberle:

did you consider, that Mind Note is a perfect brainstorming and outlining tool?

It easy super easy to share data between this apps.
Have you tried it?

Well sure, there are tons of perfect brainstorming and outlining tools, and Drafts has always been great at sharing data between apps. What I don’t understand is why shouldn’t Drafts just have basic outlining built in in the first place when it’s standard in so many other apps. Could it possibly create compatibility issues? Maybe, I don’t know enough about Markdown etc. to know, but if outlining is an optional mode, just like link mode and arrange mode, then that shouldn’t even be a problem. People won’t have any compatibility issues because it won’t be on unless they turn it on.

Again, I honestly don’t understand why it should cause any compatibility issues since outlining is native in Markdown and HTML. I understand that certain Markdown parsers render differently, but my guess is those are probably going to create rare edge corner cases, and again they shouldn’t be a problem if outline mode is optional.

@DandyLyons sorry for the cross talk.

Haha, thanks @Andreas_Haberle I appreciate it.

No reason why not. Maybe only that it is one feature more.

The question for me is if it could be implemented without the core of drafts (via actions)

I do agree.
Outlining in a text file (like markdown) raises no issues.

1 Like

I could live with reassigning, say ⌥-TAB to the “indent” action, but what drives me crazy is that [edit:SOMETIMES] I can’t use the standard Indent action to move the whole line to a lower level in a hierarchical list (ordered or unordered) unless I first move the cursor to the beginning of the line, and then apply the indent, and then move the cursor back to the position I was in. That’s so tedious. Is there some way to have the whole line moved to a lower level in the hierarchy, without having to move the cursor?

1 Like

Agreed Joel. In fact the included Indent action seems to be inconsistent. Most of the time, I don’t have to move the cursor to the beginning. I just use the indent action it will auto move the cursor to the beginning of the line, then tab, then move the cursor back. Wonderful. But sometimes it doesn’t behave that way and I haven’t figured out why. It’ll just do nothing.

Another thing I’ve found is that it never works when the line is empty. Which is not the end of the world, bc I can just type in something first, but it feels clunky.

On transclude, perhaps my mdpre open source project will interest you.

That is entirely possible. Lots of editors have functionality that allow you to partially/fully select one or more lines and indent/outdent accordingly, while retaining the existing selection, which for a single line could just be the cursor position. But, it does take a little bit of thought about how to do it as your selection needs to expand or contract dynamically as the indentations are added or removed at various points prior to the end of the selection. But Drafts does give us the tools to build that functionality in.

I’ve just added an update to TADpoLe to provides some functions for prepending, un-prepending, appending and un-appending to a line selection while effectively retaining an equivalent text selection.

To go along with those functions, there’s now TA-Indent and TA-Outdent in the ThoughtAsylum - Tasks & Lists action group that utilises these to prepend and un-prepend using a single tab character, but it really could be pretty much any character string you like.

Give it a try and see if that gets you closer to your goal.

2 Likes

@sylumer you are are hero.

I would guess outlining would be a great use case of drafts.

1 Like

Terrific! Thanks for helping out.