Syntax Highlighting for Makefiles?

Syntax Highlighting for Makefiles?

2
NewbieNewbie
2

    Aug 27, 2007#1

    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

    6,602548
    Grand MasterGrand Master
    6,602548

      Aug 28, 2007#2

      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.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Aug 29, 2007#3

        Thanks!

        3
        NewbieNewbie
        3

          Jul 29, 2008#4

          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, etc.).

          It would be useful for UE to optionally guess the syntax from the first line of the file if the file extension is unrecognized. 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?

          Update: UltraEdit v19.00 introduced the feature to detect Perl, PHP and Python scripts via shebang and XML files via XML declaration if no or unknown file extension for syntax highlighting.