live templates with optional arguments

1) How can I create a live template which may have optional arguments?

function(param1, param2, param3) {

Where param2 and param3 are optional. I'd like to either TAB thru one (or both) of them or DEL if I don't want the parameter. Result would be

function(param1) { ... }


function(param1, param2) { ..}


function(param1, param3) {...}

1 comment
Comment actions Permalink

Hi there,

I do not think it's possible at all.

I mean -- you can leave params empty .. but commas will still be there.

Better declare just a single parameter and type all of them (1 or 2 or 3) when needed -- it's just a placeholder so you can type anything there:

function $NAME$ ($PARAMS$) {


Please sign in to leave a comment.