2

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 .

- Is there something missing in language-javascript package configuration ?

- Is Ruby snippet distinguish of JS Snippet since backticks is used in JS for Strings ?

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
Abdennour TOUMI
  • 87,526
  • 38
  • 249
  • 254

0 Answers0