Update 2016-09
This is now supported in Atom - please see the other answer for how to use it. I can't delete this answer since it is the accepted one...
Old Answer
The documentation for the snippets package has an example that shows how to predefine the default value for a variable:
'.source.js':
'console.log':
'prefix': 'log'
'body': 'console.log(${1:"crash"});$2'
In the above example, crash is used as the default value for the log statement, allowing you to provide your own value by overwriting the crash default.
I guess what you're asking is whether there's a way to automatically use a value you typed and then apply it to the other instances of the same placeholder. So in your example, when you're at variable $1
and type foo
, that it uses foo
for all other occurrences of ${VAR}
, right?
That's currently not possible from what I understand. I suggest you open a feature request at the snippets package's repo, or even better take a stab at adding this functionality and then creating a pull request.
Sorry if this doesn't help you, but you asked whether there was a way of doing this with the current version of Atom. The answer seems to be No at the present time.