Keyboard shortcuts/menu option/applescript to focus the MD editing area?

I tried googling but was prepelxed i couldn’t find an answer.

is there keyboard shortcuts/menu option/apple script to focus the MD editing area?

thx a bunch

Z

Instead of clicking in it with the mouse?

Depends where you’re starting from, of course, but if you have the View > Document Display > Side by Side (cmd-ctl-y) or Preview (cmd-ctl-y) views up, then cmd-ctl-x will change it to Source view so you can edit/add text. You can then move back to Side-by-Side with cmd-ctl-y and the cursor will stay in the markdown editor.

It’s still not as good as it could be — AFAIK there’s no facility to keep the markdown and preview position in sync, but it’s better than having to use the mouse just to switch panels.

thx @brookter and @chrillek

yes without a mouse as im trying to use Keyboard Maestro to quick add text snippets when i create a new .MD file.

@brookter: when i create a new markdown file and press cmd-ctl-x that dosent seem to focus the edit area. any clue why that maybe? (see below example of where im focused (lemon) and where i want the cursor to end (TT)

best

Z

Do you mean from the Data > New Markdown Text menu?

Ctl-tab will do that, if you already have Source Mode selected. Or you can use cmd-o to open the new document in its own window — again it will open with the default view, which you can set to Source View in Preferences > Media > Markdown Display > Edit Documents.

So from Keyboard Maestro all you need is a call to the menu command for a new markdown text, then send the cmd-o or Ctl-tab shortcuts.

(I have a Keyboard Maestro palette with a number of these document launchers on: the palette shortcut is shift-opt-d, them it’s m to invoke this macro).

HTH

awesome @brookter!!

the Command+o works great!

(I have a Keyboard Maestro palette with a number of these document launchers on: the palette shortcut is shift-opt-d , them it’s m to invoke this macro).

if you wouldn’t mind sharing these macros/pallets i think that would be epic to learn from!

thx again

Z

You’re welcome… Here’s a short palette for documents. It’s very basic, but it should show how to use the palette. You’ll notice that several items have the same short cut — that’s because when KM sees a conflict it brings up another palette for just the conflicted entries. The effect is a cascading menu (alt-shift-d > m > d for MD Document, rather than MD Marked, for example).

As I said, it’s very basic, but it’s helpful.

You can get a lot more complicated than this — but with DT3 that often involves using calling AppleScript and they’re a lot more specific to individual workflows so they’re harder to share easily.

If you have a look at this thread: Bookends, DT3, and annotations, I’ve discussed an annotation workflow using KM and AppleScript, which is almost entirely based on scripts written by Korm and Frederiko (who know far more than I ever will about such things). It populates a new annotation document from an initial data entry screen. It probably won’t be directly copiable, but it may give you some ideas of what can be achieved — and if you search the forum you’ll find some more sophisticated examples.

HTH.

thx so much @brookter!

very helpful

Z