Live Template not working 关注
I'm just getting started with webstorm and I can't get my live templates to work.
Also I've created a more complex, multi-line template for a regular HTML5 file with the same results.
I'm pretty sure that I'm missing something here but after going through the docs (https://www.jetbrains.com/help/phpstorm/2016.2/live-templates.html) I'm still running into the same issue.
I'm using version 2016.2.2
If you start your path in `<script src=` with slash and then hit Ctrl+space, WebStorm will suggest files/folders in your project root. So, if your absolute paths start in your project root, then yes, you can get the completion
Thanks and sorry for the stupidity ;)
I don't know if I can follow up with a non-related question (is about webstorm but not the same issue though). I'm still a fan of CDN's and for the same reason I keep a local copy of different versions of some frameworks I frequently use in a specific folder of my local server. I normally use an absolute path to reach those files like: /scripts/gsap/1.18.3/uncompressed/TweenMax.js
Is there a way to use absolute paths in webstorm file autocomplete to avoid going back several folders in order to avoid this: ../../../scripts/gsap/blah-blah?
But the path is always relative to the project root, not the filesystem, right?
Right. It's relative either to project root or to the folder marked as Resource root
So even after reading this I couldnt find where to set the context.
Found it with the help of youtube.
Anyway at the bottom there is a blue text "change" you have to click to bring up the context menu. Jetbrains and settings...
See Live Templates—WebStorm (jetbrains.com):
The available context types depend on the enabled plugins.
My point was about the settings UI that is just plain bad. Youtube should not be needed to figure this stuff out.
The page you link to doesn't have a realworld example, screenshot etc..
Again, jetbrains settings are a lot of work, much can be made easier by having a good ui