bugGNU nano - Bugs: bug #24197, Request for syntax highlighting...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #24197: Request for syntax highlighting based on file contents/header

Submitter:  Dave Lemonby <dreamlax>
Submitted:  Wed 03 Sep 2008 09:40:25 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  astyanax Open/Closed:  Closed

Sat 04 Oct 2008 10:05:27 AM UTC, comment #3: 

Cleanup, this fix is in release.

Chris Allegretta <astyanax>
Group administrator
Mon 22 Sep 2008 12:00:24 AM UTC, comment #2: 

Hi Dave,

I added this functionality in r4328 and added some basic regexes to match on the shebang line.  If you don't want to try out current subversnion, this should be available in version 2.1.6.

Chris Allegretta <astyanax>
Group administrator
Sun 21 Sep 2008 03:54:22 AM UTC, comment #1: 

Thanks for the suggestion Dave, we should be able to do something with this I think, give me a few days.

Chris Allegretta <astyanax>
Group administrator
Wed 03 Sep 2008 09:40:25 PM UTC, original submission:  

I regularly edit shell scripts and find myself either having to give them an extension of ".sh" or forcing colour highlighting with -Ysh.

I have produced a really, really crappy hack that inspects the first line of the file and compares it to "#!/bin/sh", and if it matches, then syntaxstr is set to "sh".

Please keep in mind this is a very crappy hack that I have put together in a rush.

Is it possible to have some sort of syntax highlighting based on file-header as well as extension (not sure which one would take precedence)?

Attached file color.gz is the color.c file from 2.1.5 release.

Dave Lemonby <dreamlax>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #16425:  color.gz added by dreamlax (2KiB - application/gzip - color.c from 2.1.5 release)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by astyanax (Posted a comment)
  • -email is unavailable- added by dreamlax (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-10-04 astyanax Open/ClosedOpen Closed
    2008-09-22 astyanax StatusIn Progress Fixed
    2008-09-21 astyanax StatusNone In Progress
        Assigned toNone astyanax
    2008-09-03 dreamlax Attached File- Added color.gz, #16425

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code