Reputation: 503
Is it possible to create code template that will use written value?
simple example:
firstly: while + tab
gives standard while code.
I would like to create something where while 100 + tab
would give:
while (i<100) {
}
Where 100 is given value and can be different. Also would be nice to have more than one custom value.
Upvotes: 0
Views: 48
Reputation: 4727
Go to Tools -> Options
.
Then click on Editor
and go to Code Templates
tab.
Click New
, give and abbreviation and the code template.
Look at the existing templates, like whilexp
- it shows how
to prompt for input on the code template.
Upvotes: 1