Current behaviour:
Selection of available Code Templates follow the file type of the current file.
Desired behaviour:
Optionally, the selection of available code templates should follow the current syntax highlighting style when "Dynamic highlighting" is on.
Possible implementation:
- Add the following sub-option to "Dynamic highlighting": "Dynamic code templates". The option should only be available when "Dynamic highlighting" is checked.
- When enabled, the selection of available code templates will follow the current syntax highlighting style.
Usage Example:
In foo.php:
1) Outside a PHP block, we wish to insert a <script> block using code templates: As this is available in the HTML code template library, we just position the cursor outside a PHP block (that is; in the HTML part of the .php) and type "scri", Ctrl + J.
2) Inside the javascript block, we want to insert a function declaration using code templates: As this is available in the JavaScript code template library, we just position the cursor inside the javascript block (that is; in the JavaScript part of the HTML part of the .php
and type "fun", Ctrl + J.