MacDownApp / macdown

Open source Markdown editor for macOS.

Home Page:https://macdown.uranusjr.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for macOS'es system wide on the fly text replacements

porg opened this issue · comments

commented

Problem

  • System Preferences > Keyboard > Text
  • The text replacements configured here work in almost all Mac apps (if Cocoa based)
  • But not in MacDown as of 0.7.3, see video:
MacDown.support.for.system.wide.text.replacement.of.macOS.mp4

UX Design Rationale

  • MacOS'es on the fly text replacement should in theory not be in conflict with MarkDown's real time parsing and rendering.
  • Because while you type macOS by default passes on the input unmanipulated and shows the preview in the bubble above, only when entering a SPACE the transformation happens.
  • And you as a user can avoid this by pressing ESC as long as the preview bubble is still there.
  • I see no usability conflict.

Considerations

  • But I do not know the inner workings of MacDown and maybe such a seemingly small thing is more tricky than I imagine.
  • If it is overally ok, but some edge cases conflicts are possible, let me tell you:
    • I'd be ok with a preference option "Use macOS text replacements" which by default is off and can be enabled for those who want it and are willing to accept possible side effects.
commented

Does this feature request have a chance of implementation?

  • I run into this lack of functionality almost every time using MacDown as I use replacement shortcuts for emoticons or abbreviation-expansion quite frequently.
  • Would very much appreciate a first reaction at least, if possible. Thanks.
commented

Asking again: Is there a chance that this gets implemented?

commented

I meanwhile have an acceptable workaround

  • Use TextEdit and MacDown side-by-side

    • MacDown configured to only show the Markdown preview panel, the source code panel hidden
    • TextEdit serves as the source code editor
  • With this combo I get the best from two worlds:

    • TextEdit supports the standard macOS text replacement as defined in System Preferences > Keyboard > Text
    • And MacDown with it's Markdown renderer which updates properly on each save event it gets from TextEdit
    • You could even do editing in both. Just be sure to always change+save in one app, then change+save in the other app, so that they never have a change conflict.
    • Both apps seem to properly get the filesystem notifications and always update nicely!

Edit markup in TextEdit with macOS text replacement support while MacDown refreshes Markdown preview on each save event

I also want this

commented

@meganlavengood I meanwhile have an even better workaround.

  1. Open Spotlight with ⌘-Space
  2. Type your text shortcut.
  3. Select all with ⌘-A
  4. Cut with ⌘-X
  5. Close Spotlight with ESC. Focus gets back to your app.
  6. Paste with ⌘-V

The time overhead (steps 1 + 3-6) takes only 2 secs. Is worth it.

And Spotlight is universally available. Even in Full Screen mode of apps (if they use the standard system calls for this).