TheSprintingEngineer
TheSprintingEngineer

Reputation: 319

Add syntax highlighting to certain file extensions for VIM or GVIM by default

In my Linux machine files with the .sv extension opens up by default with the verilog syntax highlighting scheme, however extension with .vor .vs don't. I have to manually in gvim do a :set syntax=verilog every time I open one of these files.

How do I make those file extensions .v or .vs open up in a verilog syntax highlighting by default ?

Thanks

Upvotes: 10

Views: 30186

Answers (1)

sidyll
sidyll

Reputation: 59287

Add an auto-command to your .vimrc to do that for you:

autocmd BufNewFile,BufRead *.v,*.vs set syntax=verilog

Upvotes: 18

Related Questions