Daniel
Daniel

Reputation: 2726

How to know which syntax highlighting is being used in vim?

Newbie here. I opened a file without any extension with VIM, and its syntax is highlighted. I want to know which command will show me that which syntax highlighting is being used? i.e., is this a C++ highlighting or C highlighting....?

Upvotes: 3

Views: 1118

Answers (1)

bolty187
bolty187

Reputation: 186

VIM tries to automatically detect file type by default. To see which file type is currently detected type (in command mode):

:set filetype?

to set it to any particular type:

:set filetype=<filetype>

Upvotes: 5

Related Questions