Sign in to follow this  
Followers 0
BitRot

SciTE editor : adding another file-extension

11 posts in this topic

Hello All,

I would like to, to keep my working files seperate from my files containing library functions (UDF's, subroutines that can be used by other programs, prety-much like currently allso present in the include-directory), give those files another extension. In my case : .lib

Although that is easily done, and there is no problem including those .lib-files into other .au3 sources, there is one thing that is bothering me : When I open those .lib-files with the SciTE -editor all syntax-highlighting is gone.

Not really a problem, I thought, as the settings seem to be defined in a file called "au3.properties".

But alas, the truth was not as easy : no matter what I did (renaming the file, putting it next to the au3.api in the SciTE's api-directory) the editor did what he allways did, seemingly fully ignoring that file.

I even renamed both the found "au3.api" files as well as the "au3.properties" file, and the editor goes on as if nothing changed ...

Share this post


Link to post
Share on other sites



Hello All,

I would like to, to keep my working files seperate from my files containing library functions (UDF's, subroutines that can be used by other programs, prety-much like currently allso present in the include-directory), give those files another extension. In my case : .lib

Although that is easily done, and there is no problem including those .lib-files into other .au3 sources, there is one thing that is bothering me : When I open those .lib-files with the SciTE -editor all syntax-highlighting is gone.

Not really a problem, I thought, as the settings seem to be defined in a file called "au3.properties".

But alas, the truth was not as easy : no matter what I did (renaming the file, putting it next to the au3.api in the SciTE's api-directory) the editor did what he allways did, seemingly fully ignoring that file.

I even renamed both the found "au3.api" files as well as the "au3.properties" file, and the editor goes on as if nothing changed ...

change this line in au3.properties:

file.patterns.au3=*.au3;*.lib


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Why don't you just rename your files "filename.lib.au3", or "LIB_filename.au3"?

That's a possibility. But shouldn't it be possible to adjust the preferences too ? :lmao:

Share this post


Link to post
Share on other sites

change this line in au3.properties:

I allready tried that, and have just done so again, to be very sure. No change. :lmao:

Is it possible it won't work because I'm using the SciTE editor (the depricated one) that came with the installation of AutoIt ?

Share this post


Link to post
Share on other sites

If you add the line that JdeB suggests into the User Options file then it should use it.

Share this post


Link to post
Share on other sites

If you add the line that JdeB suggests into the User Options file then it should use it.

Dow!... Never thought of adding it there. :lmao:

Now I see the "lib" files when selecting the "file types" -mode "Autoit (au3)", but syntax-highlighting is still off. I can switch it on by pressing shift-F12 (switching "language" to AutoIt), but do you know a way to set that as default for the .lib extension ? I did look for something comparable in the "au3.properties" file, but did not find anything.

Thanks.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Dow!... Never thought of adding it there. :lmao:

Now I see the "lib" files when selecting the "file types" -mode "Autoit (au3)", but syntax-highlighting is still off. I can switch it on by pressing shift-F12 (switching "language" to AutoIt), but do you know a way to set that as default for the .lib extension ? I did look for something comparable in the "au3.properties" file, but did not find anything.

Thanks.

Syntax highlighting will work for *.lib when the changes I suggested is made ....

The line is at the top of au3.properties:

# SciTE settings for AutoIt v3

#

# September 21, 2006 - Jos van der Zande (jdeb (at) autoitscript (dot) com)

#

#

# *** Specify here your AutoIt program directory ***

autoit3dir=C:\Program Files\AutoIt3

file.patterns.au3=*.au3;*.lib

filter.au3=AutoIt (au3)|$(file.patterns.au3)|

lexer.$(file.patterns.au3)=au3

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Syntax highlighting will work for *.lib when the changes I suggested is made ....

Thanks, that "lexer=" line did it. :ph34r:

By the way : what does the "filter.au3=" -line actually do ? Before your current posting I allready had it changed this way and that, but did not see anything change. I tried your solution with, and without that line, and could again not spot any differences. :lmao:

Share this post


Link to post
Share on other sites

Dow!... Never thought of adding it there. :lmao:

Now I see the "lib" files when selecting the "file types" -mode "Autoit (au3)", but syntax-highlighting is still off. I can switch it on by pressing shift-F12 (switching "language" to AutoIt), but do you know a way to set that as default for the .lib extension ? I did look for something comparable in the "au3.properties" file, but did not find anything.

Thanks.

If this is a multi-user machine, then you can make a "SciTEGlobal.properties" in the Scite4AutoIt3 (the SC1 version) directory and add your Global entries in there. If you want to separate the Global entries as for using multiple languages, then you add "import au3" to the "SciTEGlobal.properties" file that you created, then create a "au3.properties" file and then add you Global Au3 entries into the "au3.properties" file. Entries in these files will overrule the same entries that are internally set.

Per user settings definitely should be in the "SciTEUser.properties" file (User Options).

:ph34r:

Share this post


Link to post
Share on other sites

If this is a multi-user machine, ...

Thanks for the info. I'm currently on a single-user machine, but I'll keep it under my hat. :lmao:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0