JAVASCRIPT :
A = {
x : funciton(){
},
y : function(){
}
}
What do I want?
I want to write a sublime snippet which when invoked inside x
or y
function, should be able to get the function name and put it.
Example - The DocBlockr plugin automatically gets the name/arguments of a method before which you create the block by hittin /**
and hit Enter
I know how to write basic snippets but not sure whether a snippet can get the names or tokens from a file. Not even sure if it is possible.
NOTE - I could not do much by myself as I cant figure out where to start for this one.