[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re:[Fwd: Syntax Selectoin]



James wrote:
> Mark Loftis wrote:
> >     It's nice to see the scrolling change in 1.5.5b .
> 
> I only see 1.5.5a on the page, did I miss something? 

Oops! My fault, I copied the version directly from my personal
source tree, not the latest release. The only "official"
new version I know of is '1.5.5a'.

Kenn Flynn wrote: 
> Why would you need regular expression parsing?  Do you have a
> specific use in mind where the file extension would be
> insufficient?

	Actually, I can think of a couple of uses. One use would be to match
whole file names, such as a 'Makefile'. The matching of regluar
expressions would allows you to define a pattern, say
'^[Mm]akefile\.?.*' that would pick up all makefiles regardless of
extension. This was the reason I choose to add this functionality.

	Another possibility with a simple modifocation is the use of
a default directory. In other words all files matching a specific
directory default to the assigned syntax. So you can have a directory,
say '/bin/perl' which contains various perl scripts which don't have the
extension '.p', and now you have the ability to edit these files in a
colorfull environment.
	Taking this idea a little further... A hook could be placed for files
with no defined syntax, which could check for a '#!' directive
in the file. The executable in the directive could then be looked-up
in some table to translate to a standard name. This standard name could
then be used to match against the defined syntax patterns.
	If you've got any other ideas I'd love to hear them. Or if you think
all of this is unnecessary, I wouldn't mind hearing why.
----
		Mark Loftis <mloftis@lanminds.com>