0
Not a bug

Emmet has broken Emacs style keys - ^A and ^E for start of line and end of line

pelletee r 4 years ago • updated by amn 3 months ago 7
Is there anyway to get this functionality back when working on a MD(markdown) file?

Answer

Answer
Not a bug
You are right, the standard Emmet keyboard shortcuts conflict with emacs commands.

As a workaround, you can go to your Mac's System Preferences -> Keyboard -> Shortcuts -> App Shortcuts and override the standard shortcuts for those two commands with other shortcuts. Here are screenshots of how this might look:





If you do this, you can use ctrl+a and ctrl+e as you are used to.

GOOD, I'M SATISFIED
Great
Satisfaction mark by pelletee r 4 years ago
Answer
Not a bug
You are right, the standard Emmet keyboard shortcuts conflict with emacs commands.

As a workaround, you can go to your Mac's System Preferences -> Keyboard -> Shortcuts -> App Shortcuts and override the standard shortcuts for those two commands with other shortcuts. Here are screenshots of how this might look:





If you do this, you can use ctrl+a and ctrl+e as you are used to.

+2
Ok thanks, I had no idea you could override app shortcuts in this way.
It's very handy to know.
For what it's worth i'd say a lot of other people who don't use emmet will have this trouble... if there was a solution which didn't require exact spelling of the menu items in such a round about way it might be worth while for customer satisfaction.
Cheers for the great customer support! :)
+1

This decades old Emacs/macOS/Unix Ctrl+A and Ctrl+E convention is used pretty much everywhere for text editing in macOS. Changing the default text editing behavior for Ctrl+A and Ctrl+E is not at all intuitive for text editor users on macOS, and I would thus argue that this is a UX bug.


This bug really tripped me up. I couldn't use Textastic productively on macOS, until I found this thread and its workaround. I'm probably not alone. It's a shame on an otherwise terrific text editor. Most ironic and confusing of all, you can by default use Emacs Ctrl+A and Ctrl+E when editing text in the Textastic preferences, but not when editing text in the actual text editor.


An option to completely disable Emmet in Textastic, and thus get standard Emacs/macOS/Unix Ctrl+A and Ctrl+E behavior without any workarounds would be greatly appreciated. It's annoying and error prone having to deploy workarounds, to get standard macOS text editing behavior in a text editor, on every macOS system where you wish to use Textastic.

You're probably right. The author of Emmet chose those keyboard shortcuts for his other editor plugins (TextMate, Sublime Text, Coda, Atom...). I didn't know about the Emacs shortcuts at the time, so I just used them in Textastic, too. I thought it would be best to use the same shortcuts Emmet users know from other editors.

I'm not sure how to really fix this problem. Add a setting to disable the Emmet shortcuts? Disable them by default? I don't really want to make all shortcuts configurable, but maybe that would be the best solution.

I totally get where you're coming from. From your description, the decision made perfect sense at the time.

I think the key to this is that Emmet, as I've understood it, is a non-default plugin in those other text editors you mentioned. In those editors, the user explicitly elected to use Emmet, along with its shortcuts. As someone who has never used Emmet, I've never had any issues using Emacs style Ctrl+A and Ctrl+E in neither Atom nor Sublime Text (in their default configurations).

Since you've had the Emmet shortcuts enabled in Textastic for some time, you risk confusion existing users of Emmet in Textastic if you disable them by default (while keeping Emmet enabled). At the same time, you risk alienating new users of Textastic having the Emmet shortcuts enabled by default.

Therefore, I still think that adding an option to disabled Emmet completly makes most sense. That way the user can choose to use Emmet, along with its shortcuts, or not. By disabling Emmet by default, and having an option in Preferences to enable it, you don't risk confusing neither Emmet nor Emacs shortcut users. Since Emmet is a plugin in other well known editors, enabling/disabling Emmet as a plugin in Textastic is intuitive. Users experienced enough to use the Emmet plugin, will know to look in the preferences to enable it.

+1

Thanks a lot for your insightful answer. I agree that it's probably more important to not alienate new users. 


I'm going to disable the shortcuts by default in a new version and will add a preference to enable it.

+1

Thank you, for an awesome app on macOS as well as on iOS and thoughtful support. :-)