Shortcut for code formatting (MarkDown)
-
benny
- State changed from new to accepted
You can change default shortcuts somewhere in the System Preferences ▸ Keyboard pane.
The ⌘K is based on TextEdit (and probably others). I assume you have ⌘K from some other application?
I guess MailMate should also have a default shortcut for code snippets. Maybe even automatically detecting if multiple lines are selected. I'll put this in the accepted state for that, but I have already added that something like this should work in the next update:
"@C" = "toggleCode:";It works like bold/italic. In this example, I've given it the ⇧⌘C shortcut.
-
Ingo Lantschner
Thanks benny! I can't find the cmd-K anywhere in the Systempreferences. In TextMate it's used for code-formating and what exactly it does depends on the context. I am quite sure that I would find that inside of the TextMate Bundles - so this unrelated to your product I guess.
In MailMate I get an URL with that same key-combination (cmd-K) which is always a bit confusing for me. Therefore my intention to change that to something else. If understood you correctly a keybinding for code-formating will be possible in some future update.
The only question left for the moment: Where can I change the URL-formating (from cmd-K to whatever)? It's not in the System-wide preferences and at least in the GUI of MailMate I did not find it as well.
-
benny
Go to System Preferences ▸ Keyboard ▸ Shortcuts ▸ App Shortcuts and add a new item to override the key for the existing one (“Add Link”). (I haven't verified that this works.)
-
Ingo Lantschner
Thanks and yes it works exactly as you described. I have chosen ⌘U and now it makes an URL in MailMate and ⌘K is free for the upcoming "Format Code".
-
Ingo Lantschner
Thanks Benny, hiting ⌘K to format a code-snippet works now in the new release. It took me a while to find the place where to set this key-binding. It's not in the Systempreferences as the above mentioned example for adding a link but in a special plist-file in
~/Library/Application Support/MailMate/Resources/KeyBindings/(others may have to create and mention the file first in the MailMate preferences). The help of Mailmate regarding Custom Keybindings helped me to find that.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.