Text Expander Newbie

The brackets thing is genius! Thanks!

1 Like

@HellsKitchenDweller @JKoopmans and @Ferrers I posted a modification of this expansion on Keyboard Maestro Discourse. Inspired by @Ferrers idea. Thanks, it is going to save me a lot of time.

2 Likes

I’ve now done both, added a similar macro to Keyboard Maestro that cuts selected text, adds brackets, pasts text back in and goes to the position after the last bracket. In TextExpander I have the setup as described by @Ferrers

Always fun when these things work :slight_smile:

1 Like

@JKoopmans could you post that Macro up? It would REALLY be useful, I can’t quite see how to do it off hand. I just hadn’t thought of doing what he did. Another interesting point about shortcuts and snippets is that there are quite a few that one just hasn’t thought of :star_struck:

I just asked @peternlewis a question about cursor placement before I saw this. Have you posted up your Macro on their site? It would be really useful to me. I am looking for ways of putting the cursor back wihere it started on these text manipulations and you seem to have a strategy for that? Could either you or @Ferrers actually show the full description of the snippets and/or macros you use.
Do you @JKoopmans use LaTeX a lot? I use Ulysses too and curly brackets have a markup function there, but one which is different from LaTeX where they protect text. It is quite complicated at times!

I write a lot of dialog and the " expansion is a great time/error saver. Thanks.

1 Like

I’ve done it this way.

I trigger it through a keyboard shortcut or a palette, both work nicely.

workflow: Select the text -> run the macro -> done.

which in practice does this:

select text -> run macro -> cut selected text -> type ( which expands to () -> insert cursor between the brackets-> paste -> go right 1 space to be outside the brackets again.

“type the Shift-9 keystroke” is because I have textexpander expand “(” to “()”
“type the right arrow keystroke” is there because textexpander also puts the cursor between the brackets.

<note: once I’m fully comfortable this works correctly I’m going to remove the pauses>

1 Like

I’ve tried to get that to work but I seem to get embedded clippings from who knows where in text all the time and it messes me up. The only thing I use TextExpander for regularly is “ddate” which expands to be the current date formatted as yyyy-mm-dd_ for use in naming files easily. Your 2 typos/misspellings are dome of my worst as well but TE doesn’t seem to properly handle them all the time for me. I’m not on the subscription model though.

@JKoopmans Neat. Thanks, simpler than I thought too but elegant. You select text before triggering the macro. I was thinking about this using an expansion within an expansion that you are doing. I was pondering that and it seems unproblematic from your example. Great, conceptually great too and satisfying. Firing off TE snippets from within Keyboard Maestro Macros is something I can use.

In case people wonder about this, I find, I don’t know if you agree, that the shift + 9 keystroke is clumsy and creates a significant pause, I touch type but not on that top row. Don’t know what that is about! I also find it slows me down a lot if I have to fiddle with the cursor even via the arrow keys, let alone with the mouse.
Like you I have got into the habit of putting pauses though and then seeing if they are really needed once the macro works.
I did it using this action, I think there are several ways one could use. I also use the hot key cmmnd + shift + z because this keeps my fingers where they already are from selecting the text. I also delete the clipboard. I do that routinely so as not to clutter its history with everything, I use the history a lot as a kind of temp store.

image

1 Like

I think the old version might now be glitchy. I get my sub on the old user rate, you might too? I use Keyboard Maestro for most of my expansions. I use the same format you do,