8

I'm using https://github.com/carlhuda/janus .

I'm doing Rails development and I have some JavaScript files where we are using es6 features. These files have extension .es6. So the files are named like users.es6.

How do I tell vim to treat files ending with .es6 as JavaScript files so that I could get syntax highlighting.

I'm using macvim but I don't think that should matter.

Nick Vanderbilt
  • 2,475
  • 3
  • 27
  • 33

1 Answers1

10

Add this to your .vimrc:

au BufNewFile,BufRead *.es6 set filetype=javascript