I'm trying to learn AutoIT and although this is only a minor issue, could you please change lines starting with # as a separate entity to commented lines that start with a ;
Just makes it harder to see where things are. It would be helpful if we could change the colour of these lines beginning with # too.
Here's a screenshot so you can see what I mean:
Thank you.
AutoIT - highlighting non-comment as a comment
AutoIT - highlighting non-comment as a comment
Live for an ideal and leave no place in the mind for anything else.
-
- Posts: 2591
- Joined: 25.08.2021 18:15
Re: AutoIT - highlighting non-comment as a comment
it is easy to change.
Cud allows 2 styles for comments
- Comment
- DocComment (greenish in default theme)
do you suggest to use DocComment for #-lines? or for ;-lines?
SublimeText don't hilite #-lines as comments, it seems. what docs of language tell about #-lines?
Cud allows 2 styles for comments
- Comment
- DocComment (greenish in default theme)
do you suggest to use DocComment for #-lines? or for ;-lines?
SublimeText don't hilite #-lines as comments, it seems. what docs of language tell about #-lines?
-
- Posts: 2591
- Joined: 25.08.2021 18:15
Re: AutoIT - highlighting non-comment as a comment
okay I got reply from AI:
In AutoIt, the `#` character is used to denote preprocessor directives. Preprocessor directives are instructions that are processed before the actual compilation of the script begins. These directives can be used to include files, define constants, and set various script behaviors.
Here are some common preprocessor directives in AutoIt:
- `#include`: Used to include the contents of another file in the script.
```autoit
#include <File.au3>
```
- `#cs` and `#ce`: Used to define a block of comments.
```autoit
#cs
This is a block comment.
It can span multiple lines.
#ce
```
- `#comments-start` and `#comments-end`: Similar to `#cs` and `#ce`, used to define a block of comments.
```autoit
#comments-start
This is another block comment.
It can also span multiple lines.
#comments-end
```
- `#AutoIt3Wrapper_`: Used for various script compilation options.
```autoit
#AutoIt3Wrapper_Outfile=MyScript.exe
```
- `#Region` and `#EndRegion`: Used to define collapsible regions in the script, which can be useful for organizing code.
```autoit
#Region MyRegion
; Code here
#EndRegion MyRegion
```
- `#OnAutoItStartRegister`: Used to register a function that will be called when the script starts.
```autoit
#OnAutoItStartRegister "MyStartupFunction"
```
These directives help in organizing and controlling the behavior of AutoIt scripts before they are executed.
===========cut end
I will follow this! good suggestion.
In AutoIt, the `#` character is used to denote preprocessor directives. Preprocessor directives are instructions that are processed before the actual compilation of the script begins. These directives can be used to include files, define constants, and set various script behaviors.
Here are some common preprocessor directives in AutoIt:
- `#include`: Used to include the contents of another file in the script.
```autoit
#include <File.au3>
```
- `#cs` and `#ce`: Used to define a block of comments.
```autoit
#cs
This is a block comment.
It can span multiple lines.
#ce
```
- `#comments-start` and `#comments-end`: Similar to `#cs` and `#ce`, used to define a block of comments.
```autoit
#comments-start
This is another block comment.
It can also span multiple lines.
#comments-end
```
- `#AutoIt3Wrapper_`: Used for various script compilation options.
```autoit
#AutoIt3Wrapper_Outfile=MyScript.exe
```
- `#Region` and `#EndRegion`: Used to define collapsible regions in the script, which can be useful for organizing code.
```autoit
#Region MyRegion
; Code here
#EndRegion MyRegion
```
- `#OnAutoItStartRegister`: Used to register a function that will be called when the script starts.
```autoit
#OnAutoItStartRegister "MyStartupFunction"
```
These directives help in organizing and controlling the behavior of AutoIt scripts before they are executed.
===========cut end
I will follow this! good suggestion.
-
- Posts: 2591
- Joined: 25.08.2021 18:15
Re: AutoIT - highlighting non-comment as a comment
reworked the lexer. now #-preprocessor words are highligted as 'Comment2' style.
also changed hilite of #cs....#ce blocks to use one style for the whole comment (to be like SublimeText).
please update from Plugins/AddonsManager and test.
also changed hilite of #cs....#ce blocks to use one style for the whole comment (to be like SublimeText).
please update from Plugins/AddonsManager and test.