user3516302
user3516302

Reputation: 81

Custom language highlighting to existing language?

I am working in a language called Sedona on windows that is very similar to C#, and was wondering if there was any way to highlight my .sedona documents like they were in C#?

Upvotes: 1

Views: 342

Answers (1)

Zach
Zach

Reputation: 4792

You can use :set syntax=languageName to force vim to use that kind of highlighting. So you would use :set syntax=cs to force C# highlighting.

Then you could put the following in your vimrc to use the C# syntax for .sedona files:

"Force vim to use C# syntax highlighting for all files with .sedona
au BufRead,BufNewFile *.sedona :set syntax=cs

Or you could put the following in your vimrc to use the C# filetype (everything that C# gets) for .sedona files:

"Associate all sedona files with the C# filetype
au BufRead,BufNewFile *.sedona setfiletype cs

Upvotes: 1

Related Questions