TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: andrew_nao on June 20, 2013, 01:45:25 PM
-
for anyone who uses notepad++ for coding, do you know of a way to have the commented text always be highlighted instead of being a set color?
right now any comment i leave in a file is green text, i would like to just have it highlighted
is this possible? im not seeing anyway but maybe someone else knows of a way
thanks
-
I'm guessing it would be as easy as modifying the xml file to reflect the desired background color.
For example, yellow (FFFF00) as the highlight (background) color:
...
<WordsStyle name="COMMENT" styleID="1" fgColor="008040" bgColor="FFFF00" fontName="" fontStyle="0" />
<WordsStyle name="COMMENT LINE" styleID="2" fgColor="008040" bgColor="FFFF00" fontName="" fontStyle="0" />
...
<shrug>
Also see this (http://www.theswamp.org/index.php?topic=40225.msg454894#msg454894) post.
-
thanks
that didnt work though, i tried to import the your file you linked to and it screwed up my color coding completely LOL
i tried to uninstall and reinstall a newer version but my color codes still arent working
i did something to mess this up ... *sigh*
-
Sorry?
This is the first I've ever heard the file I provided screwed up someone's system.
If you can determine how my file is dekcuf up I'll fix it but I don't see anything wrong with it (acknowledging I don't use it myself as I use TextPad & UltraEdit or my ASCII bashing).
-
do you know of a way to have the commented text always be highlighted instead of being a set color?
Assuming that you haven't defined your own language syntax file specifically for AutoLISP and that you are using the default LISP language defined in Notepad++ for opening .lsp files: go to Settings > Style Configurator; select LISP from the Language list and COMMENT from the Style list, then change the Background Color.
-
Sorry?
This is the first I've ever heard the file I provided screwed up someone's system.
If you can determine how my file is dekcuf up I'll fix it but I don't see anything wrong with it (acknowledging I don't use it myself as I use TextPad & UltraEdit or my ASCII bashing).
i dont even know how it did either to even explain it. i followed the steps in your link that showed how to import it but all my text went to black and my color coding was gone
but i did get it back to normal i had to goto language> then L and click on the "lisp" flyout
@Lee, that didnt work either. i think what im asking isnt possible with this.
the commentline is what i was after to always be highlight not just a different color.
i just leave it as it.
thanks for the replies :mrgreen:
-
@Lee, that didnt work either. i think what im asking isnt possible with this.
the commentline is what i was after to always be highlight not just a different color.
Sorry, change the Background Colour of the COMMENTLINE Style, not the COMMENT Style.
Also, for 'Global Styles' in the Language list, ensure 'Enable global background colour' is disabled.
Result:
(http://www.theswamp.org/lilly_pond/leemac/notepadppexample.png)
-
Thanks and this is nice to learn.
What if I want to highlight the comments below? Is it possible?
;|
atof = a-tov
atoi = A-toy
itoa = I-T-O-A
rtos = R-toz
distof = diss-tov
|;
-
Thanks and this is nice to learn.
What if I want to highlight the comments below? Is it possible?
Unfortunately I've not seen that working in Notepad++. It doesn't have a decent multiline comment parsing, at least not for AutoLisp.
In normal (built-in) Lisp mode it works fine for the #| .... |# multi-line comments. But I can't find a place to change that to use ;| ... |; instead. The only way I can get these to work is through a custom language (like the one in that other thread), but then you find it needs a double character for line comments: ;; ... otherwise the multiline version is ignored.
-
@Lee, that didnt work either. i think what im asking isnt possible with this.
the commentline is what i was after to always be highlight not just a different color.
Sorry, change the Background Colour of the COMMENTLINE Style, not the COMMENT Style.
Also, for 'Global Styles' in the Language list, ensure 'Enable global background colour' is disabled.
Result:
(http://www.theswamp.org/lilly_pond/leemac/notepadppexample.png)
thanks that worked.
-
Thanks and this is nice to learn.
What if I want to highlight the comments below? Is it possible?
Unfortunately I've not seen that working in Notepad++. It doesn't have a decent multiline comment parsing, at least not for AutoLisp.
In normal (built-in) Lisp mode it works fine for the #| .... |# multi-line comments. But I can't find a place to change that to use ;| ... |; instead. The only way I can get these to work is through a custom language (like the one in that other thread), but then you find it needs a double character for line comments: ;; ... otherwise the multiline version is ignored.
Thanks irneb.
-
on menu, "Language" -> "User Define Language", select Autolisp, Sheet "Comment & Number" on section "Commet Block" button "Styler"
-
on menu, "Language" -> "User Define Language", select Autolisp, Sheet "Comment & Number" on section "Commet Block" button "Styler"
As I stated, yes it works. But then it doesn't work for single ; comments. If you then change the comment line to allow for single ; comment, then the multi-line comments don't work anymore.
-
The way where the built-in Lisp gets around this is by using the CL's multi-line comment style. But of course that one doesn't work with AutoLisp, as ACad does not read this as a comment mark.
It's a "bug" in Notepad++ (IMO). It uses the comment line's tag as override to everything else. It should have used the comment start/stop tag as override, then this issue wouldn't have been an issue.