We recently changed our project boilerplates for using single quotes to using backticks. Working with backticks in *Storm on OSX is not as convenient as working with single quotes, thus we tried to come up with some solutions which still lack some convenience. We're looking for further ideas to find better solutions now.
How single quotes work in *Storm on OSX
How backticks work in *Storm on OSX
Since a backtick is a dead key by default, I am struggled with the same issue.
Live Template
Currently I created a live template named it --
(double-dash) for a quick which prepares a backtick-surrounded string. Below you can find the settings I used for the template:
Abbreviation: --
Description: Backticks
Template text:
`$0$`$END$
Apply: JavaScript
Unfortunately PHPStorm/Webstorm does not provide a way to toggle the quote style. Similar to the case toggler
(Edit -> Toggle Case)
Concerning the typing
Just use keystrokes <backtick>
+ <space>
and type a text
and you'll get `a text`.
Concerning surrounding
Create a Live Template called backticks
with a content of `$SELECTION$`$END$, set the context to Javascript. Go to the keymap and search for 'Surround with Live Template'. Assign a key combination. Go back to the editor, select some text, press the just assigned
combination and press 'ENTER' to confirm selecting your 'backticks' template. This will wrap your text in backticks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With