Repository navigation
Conversation
Long templates such as prompts are hard to edit in the small field, and shortcuts can only be moved between devices with a full backup. "Edit all as text" (Text expander screen) opens all shortcuts in one full screen editor, each starting with a line "=== shortcut ===": - copy all, paste all, share, save to and load from a text file - a jump bar with all shortcuts - saving applies exactly the text, after checking for errors (with line numbers) and confirming new, changed and deleted shortcuts - the state before the last save can be restored Prefixes are kept (characters before the first letter, e.g. ";cic"), regex shortcuts are written as "regex: pattern". New placeholders: %tab% inserts a tab character, %tabkey% presses the tab key (next field), %enter% presses enter (the editor action, e.g. send). With key presses, text and keys are sent one after another with a short pause, so the app can move to the next field first. No new settings. The parsing is covered by TextExpanderTextTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuiaMhLXwhErf9shhrr1uD
…text Key press placeholders (%enter%, %tabkey%) were looked for in the fully expanded text. Text from the clipboard (%clipboard%) containing "%enter%" could therefore press enter, e.g. send a message too early. Now the placeholders are replaced by internal markers in the template, before anything is inserted, and markers are removed from clipboard text. Regex shortcuts are skipped if the text before the cursor contains a marker. The remaining steps of an expansion with key presses are dropped if another app gets the focus in the meantime, or a new expansion starts, so the rest is never typed into another app. Tests in TextExpanderUtilsTest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VuiaMhLXwhErf9shhrr1uD
4di-hello
force-pushed
the
feature/text-expander-as-text
branch
from
October 19, 2026 05:39
a942d6e to
b548297
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I use the text expander a lot for long AI prompts (some are 2,000+ characters). Two things made that hard: the template field is small and fixed-height, and moving shortcuts between devices or editing them on a PC is only possible via a full backup. This PR adds both without any new settings.
Edit all as text
A button "Edit all as text" on the Text expander screen opens all shortcuts in one full screen editor:
;cic), regex shortcuts are written as=== regex: pattern ===New placeholders
%tab%inserts a tab character (indentation, tables)%tabkey%presses the Tab key, e.g. to move to the next form field%enter%presses Enter, i.e. the editor action (send, search, next) or a plain Enter key if the field has noneWith
%tabkey%/%enter%, text parts and key presses are sent one after another with a 150 ms pause after each key press, so the app can move focus first. Cursor placeholders are ignored in that case. Without these placeholders, nothing changes.Code
TextExpanderText(new): formatting, parsing, diff – plain Kotlin, covered byTextExpanderTextTest(8 tests)TextExpanderTextEditor(new): the editor screenTextExpanderScreen: button + the placeholder chip row moved into a reusable composable (no behavior change)TextExpanderUtils.expand:%tab%InputLogic.commitExpandedText: key press placeholders, the existing path is unchanged when they are not usedTests
TextExpanderTextTest8/8,InputLogicTest125 (1 skipped),SuggestionStripLayoutHelperTest4/4 – all pass on current main