It would be marvellous if the plugin would somehow use the Sublime Project root as "/", because it's often the case that my CSS files are in /css/ and my images are in /images/, and all of my references to files in CSS are absolute paths. So instead of background: url(../images/bg.png), I use background: url(/images/bg.png). In this context, the plugin is of no use
The Sublime Text API doesn't have much support for working with projects, so this request might be pretty difficult to implement... I'll look into it but it might be more work then it's worth.
Also, is there some way to have the auto-complete window make suggestions immediately as I type, rather than after a manual invocation with CTRL+SPACE? It was also unable to complete a filename if I began typing one that I knew already. IE: ../images/backg[CTRL+SPACE] yields no suggestions, even though I have a background.png image in there.
This is already possible if you add the following to your Settings file (Preferences > Settings - User):
- Code: Select all
"selector": "text.html, source.css"
(The '<' part is from your default settings so you don't want to override that.) Essentially, ST2's autocomplete will activate when you type letters. This setting gives exceptions, other characters that also trigger the autocompletion popup. As for why ../images/backg[CTRL+SPACE] yields no suggestions, this is because the plugin checks if the previous character is a /. If the autocomplete is already up though, this is not a problem.
Hope that helps!