3
votes

I'd like to be able to switch the syntax highlighting in an individual file on the fly, I assume there's a way to do it as it's a common feature in IDE's but I can't find it in any menu option.

As an example use case, a CSS file with the extension .php. Majority of the file is CSS, but because this isn't expected it has no syntax highlighting.

Currently my fix is to add this at the top of the file, not super clean or ideal.

    <?php
    if(1 == 2){
        ?><style>
    <?php } ?>

Thanks!

1
Your solution helped me with a <script> situation, nice trick! Wish I could vote this up as an answer for the question that you asked in the first place.Chris

1 Answers

0
votes

There is no switch, but embedded languages as in your example are supported by at least NB 7.3 Each language has its own syntax highlighting/code completion....