zxkmm / siyuan_auto_codeblock

auto put code block language from code
MIT License
55 stars 1 forks source link

Usage 1

  1. Place the cursor where you want to insert the code block.
  2. Type autocodeblock or acb in the slash menu and press Enter.
  3. Input or paste the code block.
  4. Click OK.

Usage 2

  1. Copy your from code somewhere
  2. Paste into SiYuan, and it will automatically detect language and set highlight regarding to the specific language.

FAQ

Q: The content that is not code after pasting is recognized as code? A: You can try Siyuan's paste as plain text shortcut (default is Ctrl+Shift+V), or right click - paste as plain text, or turn off automatic pasting and only use the slash menu.

TODO

Thanks ♥️