I am new to VSCode. Thinking about code snippets, I looked around for a way to kind of script inside the snippet. I mean to do more than just fill or transform a variable. For example...
This is a simple snippet. I am going to type rci
for the class initializer. When I enter the method arguments I would like the assignment and documentation + some other things to happen.
rci<tab>
and then def initialize(a, b)
) to result in something like this...
attr_reader :a
attr_reader :b
# @param a [...] ...
# @param b [...] ...
def initialize(a, b)
@a = a
@b = b
end
Is it possible? How can it be achieved? There could be any number of arguments. And each argument would trigger another line of the class initializer.
rci1
...rci5
. – Smite