vipzhicheng / logseq-plugin-heading-level-shortcuts

A very tiny plugin for Logseq to bind shortcuts to change heading levels
MIT License
24 stars 6 forks source link

Feature Request: Auto header level #5

Open coffeepenbit opened 1 year ago

coffeepenbit commented 1 year ago

When you right-click on the block to set the header level, there is an option to set it to "auto". This is useful for moving around blocks as they will automatically maintain the proper heading level regardless of where they're located.

Screenshot: image

felixsdgh commented 1 year ago

Yeah! That would be great!

coffeepenbit commented 9 months ago

I found a nice workaround:

Logseq_VImu0jcs2N

To do this:

  1. Create a command in config.edn, e.g.

    
    :commands
    [
    ;; I use orgmode; you can adapt it to markdown as well
    ["heading-orgmode" ":PROPERTIES:\n:heading: true\n:END:"]
    ]
    1. Restart logseq
    2. Type your new, e.g. "test", heading
    3. Hit shift + enter for a line break
    4. Use your command: /heading-orgmode (or whatever you called it in step 1)
ehehela commented 5 months ago

you can use this plugin: logseq-plugin-smart-typing to automatically add heading:: true property. my setting is as follows. 屏幕截图 2024-05-13 195431

Thus, when you enter @h at the end of a block, it will add this property automatically. Note that there is a Shift+Enter before heading:: true.