What plugin for the third sublima allows you to add variables in php / js scripts? It seems to have seen such, but forgot the name.

That is, if you created a variable, then with further writing, the sublim offers in autocomplete options and including it.

Example from phpstorm:

enter image description here

    1 answer 1

    This is a built-in behavior that selects the most similar words, just the menu with sentences is not always shown. In Linux, the offer menu can be shown explicitly by pressing Alt + / , or you can try the "add-on blindly" by pressing Tab until the desired option appears. Hotkeys can be found by looking for auto_complete in the file with "Key Bindings - Default" (available in the command palette).

    enter image description here

    As far as I understand this system, it works in tandem with syntax highlighting and uses its scopes to understand whether autocomplete is appropriate . You can separately specify in the settings the selector, which is considered appropriate . Let's say this one will cover all selectors starting with source (source code) and text (plain text), that is, almost everything :

     "auto_complete_selector": "source, text" 

    ... add to the file with user settings. And in order to calculate the necessary scopes, you can install ScopeHunter and see its output in the places of interest.

    • Maybe you misunderstood me, for example, I created a variable in the js-file var dataSend , then in the code I write dataSe and should highlight this variable, but this does not happen, but for example in php-storm there is such an opportunity. i.imgur.com/Gf7Ol9I.jpg - Jean-Claude
    • @ Jean-Claude seems to be the same: i.imgur.com/wPCs7gF.png - D-side
    • In general, I had to search and found a plugin - sublimecodeintel.imtqy.com/SublimeCodeIntel - Jean-Claude
    • @ Jean-Claude and this is, it is a little smarter and works in the project, and not within the file. - D-side