TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: andrew_nao on June 20, 2013, 01:45:25 PM

Title: notepad++ question for anyone who uses it
Post 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
Title: Re: notepad++ question for anyone who uses it
Post by: MP on June 20, 2013, 02:08:59 PM
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:

Code: [Select]
...
<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.
Title: Re: notepad++ question for anyone who uses it
Post by: andrew_nao on June 20, 2013, 02:49:07 PM
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*

Title: Re: notepad++ question for anyone who uses it
Post by: MP on June 20, 2013, 02:56:18 PM
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).
Title: Re: notepad++ question for anyone who uses it
Post by: Lee Mac on June 20, 2013, 03:09:07 PM
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.
Title: Re: notepad++ question for anyone who uses it
Post by: andrew_nao on June 20, 2013, 04:15:38 PM
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:
Title: Re: notepad++ question for anyone who uses it
Post by: Lee Mac on June 20, 2013, 05:06:12 PM
@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)
Title: Re: notepad++ question for anyone who uses it
Post by: MeasureUp on June 20, 2013, 08:16:37 PM
Thanks and this is nice to learn.
What if I want to highlight the comments below? Is it possible?
Quote
;|
atof       = a-tov
atoi       = A-toy
itoa       = I-T-O-A
rtos       = R-toz
distof     = diss-tov
|;
Title: Re: notepad++ question for anyone who uses it
Post by: irneb on June 21, 2013, 05:27:35 AM
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.
Title: Re: notepad++ question for anyone who uses it
Post by: andrew_nao on June 21, 2013, 10:05:23 AM
@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.
Title: Re: notepad++ question for anyone who uses it
Post by: MeasureUp on June 23, 2013, 07:28:46 PM
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.
Title: Re: notepad++ question for anyone who uses it
Post by: smemo on June 26, 2013, 03:00:44 AM
on menu, "Language" -> "User Define Language", select Autolisp, Sheet "Comment & Number" on section "Commet Block"  button "Styler"
Title: Re: notepad++ question for anyone who uses it
Post by: irneb on June 26, 2013, 04:11:37 AM
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.
Title: Re: notepad++ question for anyone who uses it
Post by: irneb on June 26, 2013, 04:20:51 AM
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.