Home Download Buy Blog Forum Support

How to do auto syntaxhighligting without file extension?

How to do auto syntaxhighligting without file extension?

Postby mymas on Thu Dec 22, 2011 11:17 pm

I try to edit no ext scripting file. but sublime not detect syntax by look file
at first line shebang. ex: #!/usr/bin/ruby

http://en.wikipedia.org/wiki/Shebang_%28Unix%29

How to auto detecting syntaxhighligting at such a file?

my testcase
http://dl.dropbox.com/u/4390580/nohightlight
related userecho
http://sublimetext.userecho.com/topic/8 ... -detected/
mymas
 
Posts: 1
Joined: Thu Dec 22, 2011 11:04 pm

Re: How to do auto syntaxhighligting without file extension?

Postby aparajita on Fri Dec 23, 2011 2:14 am

The SetSyntax plugin does this:

https://github.com/SublimeText/SetSyntax
aparajita
 
Posts: 177
Joined: Sun Jul 24, 2011 10:42 pm

Re: How to do auto syntaxhighligting without file extension?

Postby phillip.koebbe on Fri Dec 23, 2011 2:17 am

I've been using this script to control some syntax highlighting:

https://gist.github.com/1497794

Put it in your Packages/User directory and modify it to suit your needs.
-- Phillip

Code: Select all
while self.living? do
    mistake = Mistake.new
    self.learn_from!(mistake) unless mistake.fatal?
end
phillip.koebbe
 
Posts: 208
Joined: Tue Dec 20, 2011 4:58 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 26 guests