TIP: Setup Tab / Shift-Tab Indentation Shortcuts

Drafts ships with example actions to indent and outdent text, either on the current line or selected lines. By default, these actions are installed in the “Editing” action group (often used in the Action Bar), and are assigned to the external keyboard shortcuts ⌘-] and ⌘-[, which are commonly used shortcuts for these functions in text editors.

Many are accustomed to using Tab and Shift-Tab as the indentation keyboard shortcuts, which are the more common shortcuts in more word-processor style editors.

As of the release of Drafts 25, it is now possible to setup keyboard shortcuts assignments for actions using Tab and Shift-Tab, so this change is easily made.

Setting Up Tab / Shift Tab Indentation

  1. Be sure you have the Indent and Outdent actions. By default, they ship with Drafts in the “Editing” action group. If you have deleted these, or want to make sure you have the most current versions, visit the links about to install these actions.
  2. Locate the actions in your action list.
  3. Edit the action:
    • On iOS: Swipe to right on action in list, and select “Edit”.
    • On Mac: Secondary-Click on the action in the list, and select “Edit” from contextual menu.
  4. Locate the external keyboard shortcut settings, and change them to Tab or Shift-Tab for the appropriate actions.
    • Note: Tab is a “special key”, so to select it, use the “…” menu in the keyboard shortcut settings.

Video Walkthrough

Sometimes it’s easier to see these steps in action, so here’s a quick video demo of making the described change on iPad. If you make these changes on either iPad or Mac, the changes will sync, so you need not do it in both places.

What’s Next

Like this tip? You would likely also get something out of our working with blocks and line tip, which teaching you about moving lines and other quick shortcuts.

6 Likes

I need this exact functionality on the Mac. Is it possible?

The video does not show it, but the text above covers Mac. It’s the same steps on either platform, and if you make the changes on one, it will sync to the other if you use Drafts on both.

When I implement this on mac, it breaks the tab functionality on new lines. Pressing tab results in a new line instead of indenting. Is there a way to still indent the cursor instead of returning a new line?

Not sure what has happened - but outdent is suddenly no longer working on my Mac.

Shift-Tab works on my iPad with keyboard.

I have the indent and outdent actions installed.
I have shift-tab set up for outdent in the action’s keyboard shortcut settings and I do not have any conflicts with Drafts or system wide via System Settings.

Thoughts?

I actually had the same problem today and just reinstalled outdent and it’s working fine now. Not sure what was wrong, but that seemed to fix it.

1 Like

I should have stated - I’ve reinstalled the Outdent Action - and the problem persists…

If you change it to a totally different keyboard shortcut, does the outdent work properly? The issue is specific to it being assigned to shift-tab?

Possibly tied to any third-party utilities you may have recently installed or reconfigured that muck with the keyboard - like Keyboard Maestro, TextExpander, etc.

I changed it to a different action… then back to the shift tab and now it works :person_shrugging:t2:

1 Like

I’ll try to remember that if it comes up again. Very strange.

1 Like

This is exactly what I was looking for, thank you!

Might I suggest making Tab and Shift-Tab the default?

Coming from Bear, [ and ] was a bit of a bug Bear for me (as you point out, Tab and Shift-Tab are commonly used in notes apps) and I only stumbled upon this tip by chance.

Bit of a two-worlds problem. Tab/Shift-Tab tend to be the default for rich-text, word processor style editors (Word, Pages), command-brackets for plain text editors (Xcode, BBEdit, Sublime Text, etc.), because it is actually useful and desirable sometimes to be able actually to type a Tab character.

People come at Drafts from both sides, so there is no way to make everyone happy here with the defaults.

Oh yes, I see what you mean.

Well, I am glad I found this tip!

Thanks so much for adding this!