5

I am using MacVim and have colours set on .html documents. I working on various projects that are using the Sparkview Engine for .Net MVC. These files end in .spark. How do I in my .vimrc file set the .spark extensions to map to .html so all my colourations appear on .spark files too?

DigiKev
  • 1,071
  • 3
  • 11
  • 19

2 Answers2

6

You can use the following in your .vimrc

autocmd BufRead,BufNewFile *.spark set filetype=html

It means that every time you open or create a new spark file, the file type is set to html for the current buffer. And the appropriate syntax highlighting should be applied.

Xavier T.
  • 40,509
  • 10
  • 68
  • 97
4

Use an autocommand:

    au BufNewFile,BufRead *.spark setfiletype html
Andrea Spadaccini
  • 12,378
  • 5
  • 40
  • 54