Skip to content

How to insert template that keep indentation #1514

Closed Answered by Zachatoo
laofik219 asked this question in Help
Discussion options

You must be logged in to vote

You may need to adjust the numbers slightly, but here's a proof of concept.

<%*
const { ch } = tp.app.workspace.activeEditor.editor.getCursor();
-%>
#log/effort on [[<% tp.file.cursor() %>]]
<% " ".repeat(ch + 2) %>- I did
<% " ".repeat(ch + 4) %>- 
<% " ".repeat(ch + 2) %>- Next
<% " ".repeat(ch + 4) %>- 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@laofik219
Comment options

Answer selected by laofik219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants