Search code examples
vimmakefilesyntax-highlightinggnu-makefile-type

How display actual syntax highlight in vim?


Recently I wrote a text file without a file extension with the vim text editor and got text highlightning for all words between singel quotes like 'word' and all words ending with a colon like word:

I like this kind of highlightning.

But because I havent typed any command, which usually starts with ESC :command, I was surprised how this could happen.

Is there a command to display the actual syntax highlight which is in use?

I already have tried the command :set syntax=php which seems simliar only with different color for words like word:

Does anyone have suggestions?


Solution

  • Try entering the command

    :echo &syntax
    

    This will display the value that the syntax variable has been set to.