31

I think the available keyboard shortcuts to format selected text should be also mentioned in the editor advanced help text:

Code and Preformatted Text

Indent four spaces to create an escaped <pre> <code> block:

printf("%d\n", 42);  /* what was the

 question again? */

Add this:

You can also select the code lines and press Ctrl+K to indent four spaces.

Same (similar) for other keyboard shortcuts like

  • Strong text (Ctrl+B)
  • Emphasis (Ctrl+I)
  • Links (Ctrl+L)
  • Blockquotes (Ctrl+Q)
  • Images (Ctrl+G)
  • Runnable Snippets (Ctrl+M)
  • Numbered lists (Ctrl+O)
  • Bulleted lists (Ctrl+U)
  • Headings (Ctrl+H)
  • Rulers (Ctrl+R)

Here's a not so old related feature-request (not a dupe, since there's mainly asked why it's missing, and it doesn't have a concrete proposal, how to document it).

9
  • 4
    Yes, why not make the help longer. Nobody ever reads it anyway. (BTW: They are documented in tooltips in the editor toolbar.)
    – Cody Gray Mod
    Commented Jul 14, 2016 at 16:47
  • 1
    @CodyGray Yeah, I know. If you know what to hover on the information is there. I was stupid enough to check the help first. Commented Jul 14, 2016 at 16:51
  • 21
    Even if nothing changes, this question itself is very useful.
    – Suragch
    Commented Jul 14, 2016 at 16:59
  • 2
    I think this is definitely worth it because I did not know any of these. I have literally been hitting space 4 times every time I format someones code. How embarrassing... Commented Jul 15, 2016 at 7:15
  • @MattLishman - In the places where Ctrl+K doesn't work very well, you may want to consider copying the content into your favourite notepad/editor and then just hitting tab as required..
    – Sayse
    Commented Jul 15, 2016 at 8:06
  • 2
    It would be easier for the brain to remember if you use titles which correspond to the shortcuts, like Bold(b), Italic(i), Quote (q), Graphic(g)? , MCVE(m), Ordered list(o), Unordered list(u). Maybe with the current titles as additional info (tooltip or something) if necessary.
    – T J
    Commented Jul 15, 2016 at 8:23
  • @TJ: Snippets do not cleanly map to MCVEs, unfortunately; they are often MCVEs, but not always, and not all MCVEs by a vast margin are snippets. Commented Jul 16, 2016 at 1:47
  • What about the Mac shortcuts? (Not that the hover text mentions it either...)
    – Laurel
    Commented Jul 16, 2016 at 2:24
  • Maybe we could follow what others do and show the shortcuts when pressing Ctrl + ??
    – poke
    Commented Jul 16, 2016 at 15:43

1 Answer 1

4

The Markdown help page now includes keyboard hints:

Code and Preformatted Text

Indent four spaces to create an escaped <pre> <code> block:

printf("%d\n", 42);  /* what was the

 question again? */

You can also select text and press CTRL+K to toggle indenting as code.

(etc etc for the other keyboard hints)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .