What I’m trying to do
I want to create a snippet that upon entering cl;
, the text expands to with |
as my cursor
class | {
public:
private:
};
Things I have tried
I’ve tried including this in my snippets text box
cl; : class $end$ {$nl$
public:$nl$
private:$nl$
};$nl$
But this doesn’t expand at all. What am I doing wrong?
Obsidian itself doesn’t have any text expansion feature built-in. Are you trying to do this with an OS option, another app, a community plugin, etc.?
This is with the community plugin, Text Snippets (Link).
I think maybe the ;
is throwing things off. Try something without it. Both of these seem fine:
clp : class $end$ {$nl$ public:$nl$ private:$nl$ };$nl$
clpp : class $end$ {$nl$
public:$nl$
private:$nl$
};$nl$
![Obsidian_uuefrTdJHp](https://forum.obsidian.md/uploads/default/original/3X/6/0/600d00f620d5718b8af6aff15b344361e9748368.gif)
Thanks! It works if I press the hotkey, but not when I press tab despite me having tab as a trigger.
system
Closed
6
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.