ArianaKhit / text-snippets-obsidian

Snippets plugin for obsidian
187 stars 23 forks source link

[Feature Request] Add variable placeholders #23

Open gmkado opened 2 years ago

gmkado commented 2 years ago

Would be useful to have syntax similar to vscode's snippets: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_placeholders

Especially the ability to have duplicate placeholders. For example:

console.log('$1'); // $1

Tab stops at $1 and if you replaced it with "whatever" you would get

console.log('whatever'); // whatever
temirov commented 2 years ago

I am trying to add Google It snippet, with the start tag [ and the end tag ](https://google.com/search?q={selectedText}) but it adds {selectedText} as is. It'd be very helpful to have a backreference that could be used multiple times