Zettelkasten Forum


[REQUEST] Shortcut for Markdown Headings

edited August 19 in The Archive

Something you guys might want to consider in the future: a simple keyboard shortcut that adds a heading symbol # to the current line. If hit, twice, that'll become ## .. and so on.

I've seen it in other editors (eg bound to command+) and found it super useful.

Comments?

Post edited by ctietze on

Comments

  • @lambdaman If you use Alfred, I have created a workflow for The Archive that provides this feature.

    https://github.com/pryley/alfred-the-archive/blob/master/README.md#change-heading-levels

  • I would also really like built-in shortcuts for headings.

    In my text editor (LibreOffice) and my other markdown editor (IA Writer), I use the following shortcuts all the time: Cmd-1 for Heading 1, Cmd-2 for Heading 2 etc. It's quick and I would find it useful to have these in the Archive as well.

    Thanks.

  • I'd find this helpful also. But admittedly, anything I get used to in TA I then wish was a feature elsewhere.

    Observations logged here: write.as/via-poetica

  • edited August 19

    @samueldee said:
    I would also really like built-in shortcuts for headings.

    In my text editor (LibreOffice) and my other markdown editor (IA Writer), I use the following shortcuts all the time: Cmd-1 for Heading 1, Cmd-2 for Heading 2 etc. It's quick and I would find it useful to have these in the Archive as well.

    Thanks.

    I think you can change the keyboard mapping with Alfred, Textexpander, Keyboard Maestro, editing the MAC keybindings, or easy peasy you can add text substitutions in the Keyboard System Preferences. The ⌘ key is unavailable in the replace category but all the letters, numbers, and symbol keys are available. I chose the z key because of its proximity to the ⌘ key. Of course, you could use a different key combination.

    @samueldee this new key mapping will work in LibreOffice alongside Cmd-1 for Heading 1.

    Test 1 `

    Test 2 ##

    Test 3 ###

    Test 4 ####

    @Sociopoetic because this is a system-wide, it works in any application where the "Text Replacements" option is enabled.

    Will Simpson
    I'm a Zettelnant.
    Research: Rationalism, Zen, Non-fiction Creative Writing
    kestrelcreek.com

  • @Will thank you for that showing me that possibility.

    The solution you suggested doesn't meet my need for writing notes with the least friction as possible -- in this case, having the same quick shortcuts that I'm used to (my personal preference) for editing the content of a note.

    The way I work with a single note is:

    1. I write a first version of it, which may or may not contain headings.
    2. On a second / third pass, I edit the text, turn some text into bold (cmd-b), turn some text into italic (cmd-i), and turn some paragraphs into headings (cmd-1/2/3). Sometimes, crucially, I also change the heading using the same shortcut -- from a heading 2 to a heading 3 for example. So it's not just about adding a heading at the moment of writing, it's also about turning existing paragraphs to headings, and converting headings to headings of another level (or back to paragraphs).

    I would rather keep the same basic workflow across applications on the level of writing the text itself, even if how the notes are organised is different.

    I have been testing out different note apps, and some apps have that headings shortcut built in (Caret, IA Writer, Lightpaper, Typora - more traditional markdown editors), others do not yet (the Archive, Obsidian, Zettlr).

    So I'm checking if the developers are open to this feature request.

    Thanks

    Samuel

  • I personally often wait for requests like these to gain some traction, because to me, "the shortcut" is Cmd+left_arrow + "#" + " " -- i.e. I type the hashes quickly and by sheer muscle memory. Of course being anywhere in a line and hitting a shortcut to make the line a heading has its value, too. Thanks for reviving the discussion here.

    Author at Zettelkasten.de • https://christiantietze.de/

  • edited August 30

    I would love to see the IA Writer format shortcuts mapped to The Archive.

  • @pryley For reference, can you list those you are looking for?

    Author at Zettelkasten.de • https://christiantietze.de/

  • edited September 1

    @ctietze

    ⌘1 Heading 1
    ⌘2 Heading 2
    ⌘3 Heading 3
    ⌘4 Heading 4
    ⌘5 Heading 5
    ⌘6 Heading 6
    ⌘` Fenced Code Block around current line (or selected lines)
    ⌘. Mark Task as Completed (i.e. - [x])

    ⌥⌘` Inline Code
    ⌥⌘- Strikethrough
    ⌥⌘= Highlight
    ⌥⌘↑ Move Line Up
    ⌥⌘↓ Move Line Down

    Additionally, it would be awesome it you added two more list types:

    1. Unordered Task List (i.e. - [ ] This is a task)
    2. Ordered Task List (i.e. 1. [ ] This is a task)
Sign In or Register to comment.