Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure vim to treat .es6 files as javascript files

Tags:

vim

macvim

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.

like image 963
Nick Vanderbilt Avatar asked Jan 18 '17 03:01

Nick Vanderbilt


1 Answers

Add this to your .vimrc:

au BufNewFile,BufRead *.es6 set filetype=javascript
like image 169
Meninx - メネンックス Avatar answered Oct 06 '22 08:10

Meninx - メネンックス