Pasting multiline code snippets in dynalist

Hi, I need to paste code snippets, but when I paste the newlines are created as separate bullet points, and tabs are considered as as sub points.
Also when I copy it the tabs are removed.
Could someone tell me an easy way to manage code in dynalist?

This is the autohotkey.exe file I run on my windows PC for multiline support in dynalist

This is the code if you want to compile it yourself

I used VScode, it didn’t support multiline paste comments. So I used a macro.
Sublime text worked fine though without any sort of macro.

This is if your making a “note” on the bulletpoint and using powerpack2

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

clipboard := StrReplace(clipboard, A_Tab, A_Space A_Space)
position := RegExMatch(clipboard, "\S")
test := RegExReplace(clipboard, "m)^[ ]{" . position - 1 . "}")
clipboard := test
1 Like