I am trying to add dynamic snippet on Snippet conf file of Atom : "snippets.cson" .
I relied on this thread And i make the following attempts :
1 .
body:'var nowSec=${sec}';
variables:
sec:'new Date().getSeconds()'
2.
body:'var nowSec=$sec';
variables:
sec:'new Date().getSeconds()'
3.
body:'Array.from({length:`sec`})';
variables:
sec:'new Date().getSeconds()'
And Atom renders ${sec}
,$sec
, or sec
when calling snippet ;
which means that it does not compile it , but rather ,is does not recognize variables ?
I tried also predefined variables explained here and it does not work also .