Code Completion in Strings
Is there a way to enable code completion to work from within a string?
Example:
<div ></div>
<div class="real...
It would be awesome if an autocomplete list came up with reallylongclassnameidontwanttotypeagain in it.
请先登录再写评论。
Hi there,
What strings? Example please -- so far I see plain HTML here and nothing more.
It will -- as long as there is a style with such name in one of your .css files.
Sorry. What I meant by strings is anything within quotation marks.
I did not know that the code completion would work in the example I gave if the classname was present in a .css file. I just tried it and it worked, so that's great!
However I still run into other situations where it would be nice to have code completion. An example is:
Code | Completion | Cyclic Expand Word
NOTE: it works with words, therefore object.notation.in.string will be treated as 4 separate words (because of dots)
Thank you, that generally works. I feel like there should be an option to have these words (the ones that come up when you cycle through the Cyclic Expand Word suggestions) added to the normal code completion list that comes up automatically. I guess I'm just being picky now though.
I don't think that's picky - I think that's a great idea, as long as it's an option.
For more textual languages (such as YAML) this would make PHPStorm about perfect. I often currentlly have to open YAML documents in Sublime, simply because I want that quick code completion based on the other things typed in the document.
For my purposes, being able to choose which is the 'default' code completion (Cyclic Expand Word, SmartType, Basic) gets used for each language type.