how to write a es6 key binding, so when write $ in `` will trigger to ${}, just like #{} in coffee
es6 key binding
Hi, I’ve tried this way before, replace “contents” to what I want , and replace “.coffee” in “operand” to “.js”, but not work…
And one more important is how to check if typing in `, then trigger ${},
Could you show me the result, I really not familiar with sublime program, thank you
The ‘operand’ select when to execute this snippet. If it doesn’t work try to remove the ‘operand’ altogether and then add progressively more and more precise scopes: like ‘source.js’ (only in javascript) then ‘source.js string’ (only in javascript strings), …
To discover the scope you’re interested in , place your cursor inside your code where you want to insert the snippet and type ‘ctrl+alt+shift+p’. It will show you the current full scope. Scopes selector (like in ‘operand’) will match scopes with ‘css-like’ behavior. E.g.: string will match string.quoted.xxx