TIP: Actions for Working with Lines and Blocks

This is a quick reference to a few handy actions that work with the current line (or lines if the selected extends to multiple lines). These actions all work on the full line based on the current cursor position/selection, so there is no need to make a text selection before using them.

All of these actions can be used from the action list or action bar, but really shine when you learn the keyboard shortcuts. They all come with default keyboard shortcut assignments, but if these shortcuts are not to your liking or conflict with others you use, after installing the actions, you can edit them and assign different shortcuts.

About Arrange Mode: This article focuses on the use of some common actions to work with lines and blocks. Alternatively, if you prefer a drag and drop interface to move around lines, blocks, and sentences, Drafts offers “Arrange Mode”. Learn more about arrange mode in the User Guide.

Indent and Outdent

Indent and outdent actions ship in the default “Editing” action group, so you may already have these installed, but you might wish to follow the links and be sure to install the latest versions of these actions.

2022-07-26 10.12.30

Indent and outdent actions work as a team to allow you to create hierarchy in your text. Indent inserts whitespace at the beginning of the line. Outdent removes it. Both of these actions are written to respect the “Tab key” setting for the current syntax, as set in editor settings…so, if you have selected “4 spaces” as your tab value, indent will insert four spaces to create the indention.

By default, these actions are assigned ⌘-] and ⌘-[ keyboard shortcuts, which are commonly used by plain text editors for indention. If you prefer, you can re-assign these to the Tab and Shift-Tab keys more commonly used by word-processor-style editor. We have posted a separate tip on changing these shortcuts.

Install the Actions:

  • Indent - Default shortcut: ⌘-]
  • Outdent - Default shortcut: ⌘-[

Move Line Up / Down

These actions are handy to arrange lines in a list (or paragraphs in a document) quickly, without needing to fiddle with text selections and cut-paste operations. Both take the full content of the current line (or selected lines) and move them above the line before or below the line after.

2022-07-26 10.22.31

Install the Actions:

Duplicate Line

Creates a copy of the current line, and inserts it below the current line. Handy if you have a series of similar lines and just want to make minor changes without retyping all the content.

2022-07-26 10.22.35

Install the Action:

Installing: To install any of these actions, follow the links provided above to the Drafts Directory on a device with Drafts installed. Click on the “Install” links in the directory, and Drafts will open and prompt you to select an action group to add the action.