TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: domenicomaria on March 27, 2024, 05:40:07 AM
-
is there any utility to remove all comments in a large lsp file?
-
How large?
chatgpt will let you put a lisp in up to a maximum limit for input text is 4096. It will clean and comment pretty well. I often use it to write my header.
-
is there any utility to remove all comments in a large lsp file?
Notepad++
CTRL+H
Find what: ";.*"
Replace with: empty string ""
Replace all
-
I had one in .EXE, but it doesn't run (1991) lol
Id bet common lispers have one
-
The very old LISPTOOL can do this job, but it doesn't support ;|.......|;
-
Not sure why you'd want to do this but your text editor should be able to do this as Lastknownuser pointed out.
I had one in .EXE, but it doesn't run (1991) lol
Id bet common lispers have one
Just made one in C. Reads a directory of files and outputs to a new file while skipping all comment lines.
-
is there any utility to remove all comments in a large lsp file?
Notepad++
CTRL+H
Find what: ";.*"
Replace with: empty string ""
Replace all
Consider semi-colons in string literals, and multiline comments.
-
. . . and inline comments
(setq painInTheButt
;|some note here|; (getvar "petPeeves"))
-
When I first started using lisp, I’d have a version with comments and extra whitespace in the code removed, thinking it would run faster.
I was like compiling bro :lol:
-
Bit like on another forum a poster uses tabs and indents code problem is it pushes so far to right code disappears. I try to use 2 spaces rather than tab. Again use \t in search.
It would be pretty easy if comments are always to right -> end of line single lines, to write a lisp using Vl-position and substr writing to a temp file, option delete original or put some where else, then rename back to original.
-
When I first started using lisp, I’d have a version with comments and extra whitespace in the code removed, thinking it would run faster.
. . . :lol:
and you believed in the Easter bunny too ?