Sublime Forum

Function parameter autofill

#1

Hi.
Trying to find a solution to ‘autofill an function parameter’, what i mean by that is when i start writing the name of an predefined function and hit enter when autocomplete has the correct suggestion, then the name is fully completed and then parentheses and semicolon are added to the end of function name (); And the parentheses are autofilled with variable representation, i.e “” for string, bool for boolean, int for integer, and so.
Example:
Myfunc(string msg, list elements) {
//function code here
}

Myfunc("", []);

If I write “myf” then autocomplete fill in the rest of function name and add “(”", []);" to it. Then with tab i can easely jump to “” or [] to add content.

Im not looking for a handout but some good pointer where to start to figure this out.
This is for a language called Linden Script Language .lsl which is already an plugin for ST3

0 Likes

#2

What you are looking for is called “snippet”. This video gives you a nice introduction.

0 Likes

#3

Thank you.

0 Likes