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

 
 

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

Submitted by:  Dave Lemonby <dreamlax>
Submitted on:  Wed 03 Sep 2008 09:40:25 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Chris Allegretta <astyanax>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

Cleanup, this fix is in release.

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by astyanax (Posted a comment)
  • -unavailable- added by dreamlax (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 04 Oct 2008 10:05:27 AM UTCastyanaxOpen/ClosedOpen=>Closed
    Mon 22 Sep 2008 12:00:24 AM UTCastyanaxStatusIn Progress=>Fixed
    Sun 21 Sep 2008 03:54:22 AM UTCastyanaxStatusNone=>In Progress
      Assigned toNone=>astyanax
    Wed 03 Sep 2008 09:40:25 PM UTCdreamlaxAttached File-=>Added color.gz, #16425

    Back to the top


    Powered by Savane 3.1-cleanup1