Syntax Highlighting for Makefiles?

Syntax highlighting, code folding, brace matching, code indenting, and function list

Syntax Highlighting for Makefiles?

Postby ambys » Mon Aug 27, 2007 3:43 pm

Hello,

I'm wondering if this is possible, given that Makefiles do not have a file extension. I tried setting FILEEXTENSION to "makefile", but it had no detect when I opened my makefiles. Has anybody done this successfully, and if so could you explain!?

Gracias,
Robby
User avatar
ambys
Newbie
 
Posts: 2
Joined: Sun Aug 26, 2007 11:00 pm

Re: Syntax Highlighting for Makefiles?

Postby Mofi » Tue Aug 28, 2007 6:29 am

You can use File Names = makefile instead of File Extensions = to highlight all files with name makefile with this syntax highlighting definition.

And you can mark one of the languages with an * as last file extension (last character on a /Lxx"..." with File Extensions =) to highlight all unknown files with that language definition.

For more help see help page about Syntax Highlighting.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Syntax Highlighting for Makefiles?

Postby ambys » Wed Aug 29, 2007 1:09 pm

Thanks!
User avatar
ambys
Newbie
 
Posts: 2
Joined: Sun Aug 26, 2007 11:00 pm

Re: Syntax Highlighting for Makefiles?

Postby robbiebow » Tue Jul 29, 2008 3:47 am

Related to this, whilst the wildcard / default syntax highlighting ability is sort of useful, I edit a number of files with no file extensions but with different languages (such as Perl Makefiles, HTML templates, Bash scripts &c).

It would be useful for UE to optionally guess the syntax from the first line of the file if the file extension is unrecognised. For example, all of these are examples of the start of some common first lines that should be pretty easy to guess the language type from:

Code: Select all
#!/bin/bash
#!/usr/bin/perl
<!DOCTYPE html
<!DOCTYPE xhtml
<html


This is more a wish-list request rather than a question, but I think it would add value to UE and is a realistic improvement, no?
robbiebow
Newbie
 
Posts: 3
Joined: Tue Jul 29, 2008 3:27 am


Return to Syntax Highlighting