Shortcut to change header level

Shane's Avatar

Shane

10 Oct, 2017 05:50 PM

In a previous version of Multimarkdown Composer (v3 and before, I believe), using the command+right arrow/left arrow shortcuts on a line that is a header would increase or decrease the header level (e.g. # Header becomes ## Header with command+right arrow), rather than change the indentation. Now those shortcuts change the indentation as they do in other contexts.

While this does maintain consistency, it's unlikely that one wants to indent a line which is currently a header (among other reasons because it would no longer be a header), while, one might periodically change the organization of one's writing by promoting or demoting sections. In addition, the keyboard shortcut can be used anywhere on the line, making it faster than moving to the beginning of the line and adding/removing the appropriate number of #'s. Even more so if they are at the beginning and end of the line.

  1. Support Staff 1 Posted by Fletcher on 12 Oct, 2017 02:46 PM

    Fletcher's Avatar

    I'm not sure of the best thing to do here.

    The inconsistent behavior did bother me. Some people do use headers inside lists (I'm not sure why, but that's a separate issue). Can also have comments that start with #, and it's important to be able to indent them in relation to code blocks.

    I'm thinking that maybe a different shortcut might be useful here (and could be used in other situations where appropriate). This would allow indent/outdent to remain consistent (whether called by menu, Cmd-right, or Cmd-]).

    Thoughts?

  2. 2 Posted by Shane on 16 Oct, 2017 07:54 PM

    Shane's Avatar

    I see what you mean about there being cases where people do want to indent what would otherwise be a header (or even use a header in a list, as you said).

    Given that, and wanting to maintain consistency, I agree that different/new keyboard shortcuts would be a good solution.

    I was playing around looking for some options. I think that something with [ and ] or arrows would be good because it would be easier to remember (and have a logical increase and decrease pair). It's tricky, though, because both have lots of keyboard shortcuts already. Still, it looked like Option+Cmd+left/right arrow didn't seem to do anything, at least in my testing. Would that be an option?

    The only other context where I thought that the shortcut could be used was may with subscript/superscript to increase/decrease the height of the highlighted text, but I can imagine that there could be difficult edge cases regarding how to interpret the indent or modify the highlighted text. Though maybe not. Also, the semantics would be different, as I can only imagine it making sense if it worked on selected text, whereas the header shortcut just requires that the cursor be on the appropriate line.

    Thanks.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac