Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vagrantfile opening in SublimeText by default as Ruby extended file

On top of my Vagrantfile I have:

# -*- mode: ruby -*-
# vi: set ft=ruby :

But every time when I open the file, I have to select manually in SublimeText 3 that I wanna set the syntax to Ruby, so it'll be readable.

How can you set a filename to be opened as a ruby-file in this example. Because the file has no extension.

like image 796
user1867254 Avatar asked Feb 21 '14 16:02

user1867254


1 Answers

Your use case is exactly what ApplySyntax is written to address. In fact, I believe Vagrantfile is one of the default "samples", so you might not have to do anything. Also, comments that are handled in some special way on some editors does not apply to all editors (in this case, ST).

like image 53
skuroda Avatar answered Sep 27 '22 23:09

skuroda