Editorial Workflows

Extend backwards

public workflow

Install Workflow

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: Select backwards one word at a time

Shared by: @mikker

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
50 characters left (or to the beginning of the document) ?
Expression
max(Sel. Range: Start - 50, 0)
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
searchStart
Default to 0 outside loop ?
Variable Name
lastWordRangeStart
Value
0
Document Text ?
Folded Text
  • Include
  • Replace with:
Extract Range ?
Range (from:to)
searchStart:Sel. Range: Start
Loop through words and save the last in a variable ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
\w+
Match Group
0 (entire match)
Reverse
OFF
Generate Text ?
Text
%repeat:range
Get the start of selection ?
Search for
(\d+):\d+
Match Group (RegEx)
1
Search Type
  • Regular Expression
  • Case-insensitive Search (A = a)
  • Case-sensitive Search (A ≠ a)
Output
  • Found Text
  • Range of Text (from:to)
Set Variable ?
Variable Name
lastWordRangeStart
Value
Input
…End Repeat
Find position in entire document ?
Expression
searchStart + lastWordRangeStart
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
Select from new starting point to original end ?
Range (from:to)
Input:Sel. Range: End
Relative to
  • Entire Document
  • Current Selection
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped