TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Hypersonic on March 20, 2018, 05:05:53 PM

Title: Recomended Autolisp editor?
Post by: Hypersonic on March 20, 2018, 05:05:53 PM
Thank you for any input.
I currently use notepad and sometimes visualLisp for parenthesis matching. I don't like VisualLisp because of the file selection process to open a file is slow, and I use a file locator usually then just pop open the file with notepad.

Are there any 3rd party AutoLisp editors available that I could check out?

Thank you!
Title: Re: Recomended Autolisp editor?
Post by: Lee Mac on March 20, 2018, 07:15:03 PM
I don't like VisualLisp because of the file selection process to open a file is slow...

FWIW, You can drag & drop files into the Visual LISP IDE to automatically open them.
Title: Re: Recomended Autolisp editor?
Post by: Hypersonic on March 20, 2018, 08:08:59 PM
Well shoot, that just might solve my only complaint!
Thanks Lee!

Title: Re: Recomended Autolisp editor?
Post by: Hypersonic on March 20, 2018, 08:12:17 PM
Another question along the same line.

I would like to be able to jump around in the code to different locations that I somehow can mark, like with a bar on the side with stars on it or a brief description showing or something like that.
Does this capability exist in any of the programs out there?

I was trying notepad++ and it had a way to set a style to a certain color and you could select text, like a comment or something to change the color, but it did not seem to retain the information once you closed the file, so that feature was
not very useful.

Just looking for ways not to get lost in my code.
I don't know much about vlide, and think it may be of great value if I could figure out how to use the program breaks and variable watches etc. Any thoughts would be appreciated!
Title: Re: Recomended Autolisp editor?
Post by: Lee Mac on March 21, 2018, 09:24:08 AM
I would like to be able to jump around in the code to different locations that I somehow can mark, like with a bar on the side with stars on it or a brief description showing or something like that.
Does this capability exist in any of the programs out there?

You have the ability to set multiple bookmarks in the VLIDE, which you can then use to quickly jump between sections of bookmarked code -

(http://www.lee-mac.com/swamp/vlidebookmark.png)

However, such bookmarks will unfortunately only persist for the current session.
Title: Re: Recomended Autolisp editor?
Post by: CAB on March 21, 2018, 09:29:16 AM
I thought VLIDE had a search.
Add comments to the code  like ;;BM3 then search

Personally I open the code in VLIDE & Ultra Edit at the same time and do most of the editing in UE
Title: Re: Recomended Autolisp editor?
Post by: dgorsman on March 21, 2018, 10:01:31 AM
For what it's worth, if I start getting lost in my LISP code it's time to start splitting things up.  Either more functions or more files.
Title: Re: Recomended Autolisp editor?
Post by: ronjonp on March 21, 2018, 10:09:03 AM
For what it's worth, if I start getting lost in my LISP code it's time to start splitting things up.  Either more functions or more files.
Agreed  8)
Title: Re: Recomended Autolisp editor?
Post by: JohnK on March 21, 2018, 10:37:20 AM
I use the Vim editor and I also opened Vim and the VLIDE (like CAB does with his UE editor). Also worth mentioning that I've seen at least one Lisp interpreter plugins for Vim (No VLIDE or AutoCAD required for BASIC/GENERIC lisp evaluation -ie. statements like "cond", "+", "apply", etc-).

Vim has global bookmarks.
You set a bookmark with the "m<bookmark>" syntax (so: "ma" creates a bookmark called "a"). To create a global bookmark you use capital letter -eg. "mA". You can view your bookmarks with the "marks" command. You call a bookmark with the back-tick -eg. `a jumps to "a" bookmark.
Title: Re: Recomended Autolisp editor?
Post by: Grrr1337 on March 21, 2018, 10:41:38 AM
For what it's worth, if I start getting lost in my LISP code it's time to start splitting things up.  Either more functions or more files.

I have the habit to use custom lambda functions on-the-fly within cond - rough example:

Code - Auto/Visual Lisp: [Select]
  1.   ( (not _MyFoo) (prompt "\nFunction \"_MyFoo\" is not defined.") )
  2.   ( (not (setq SS (ssget "_:L-I" (list '(0 . "INSERT")(cons 2 (strcat "`**" (apply 'strcat (mapcar '(lambda (x) (strcat "," x)) bnms)))) '(66 . 1)))))
  3.     (prompt "\No Selection.")
  4.   )
  5.   ( ; Code block #1 - common SS->L
  6.     (
  7.       (lambda ( / i o )
  8.         (repeat (setq i (sslength SS))
  9.           (and
  10.             (setq o (vlax-ename->vla-object (ssname SS (setq i (1- i)))))
  11.             (member (vla-get-EffectiveName o) bnms)
  12.             (setq L (cons o L))
  13.           ); and
  14.         ); repeat
  15.         (not L)
  16.       ); lambda
  17.     )
  18.     (prompt "\nUnable to construct L")
  19.   ) ; #1
  20.   ( ; Code Block #2 - extract attribs
  21.     (
  22.       (lambda ( L / )
  23.         (setq aL
  24.           (mapcar
  25.             '(lambda (o)
  26.               (mapcar
  27.                 '(lambda (x)
  28.                   (mapcar
  29.                     '(lambda (xx) (vlax-get x xx))
  30.                     '(TagString TextString)
  31.                   )
  32.                 )
  33.                 (vlax-invoke o 'GetAttributes)
  34.               )
  35.             )
  36.             L
  37.           )
  38.         ); setq aL
  39.         (not aL)
  40.       ); lambda
  41.       L
  42.     )
  43.     (prompt "\nUnable to construct aL")
  44.   ) ; #2
  45.   ( (not (setq fld (GetFolder "Choose Folder" nil t))) (prompt "\nFolder not specified.") )
  46.   (t
  47.     ; ...
  48.     ; ...
  49.   ); t
  50. ); cond
  51.  

Still using subfunctions tho.

Maybe this thread (http://www.theswamp.org/index.php?topic=52083.msg570972#msg570972) helps? - I've recieved valuable advices in there.
Title: Re: Recomended Autolisp editor?
Post by: BIGAL on March 23, 2018, 05:11:26 AM
Anyone else had a look at Ovlide ? I can get the online to work but not local. Looks interesting. ductisoft.com
Title: Re: Recomended Autolisp editor?
Post by: VovKa on March 23, 2018, 05:54:19 AM
i wonder why some of you guys do not like VLIDE?
it has syntax highlighting, auto format, lots of debugging features, console, it supports projects...
Title: Re: Recomended Autolisp editor?
Post by: MP on March 23, 2018, 08:02:34 AM
I would describe it this way -- vlide is adequate -- ultra edit is pleasurable. Given that I spend 8+ hours a day writing code it might as well be the latter. Notwithstanding, eloquent LISP editing/mgmt is only one of UE's talents.
Title: Re: Recomended Autolisp editor?
Post by: BIGAL on March 25, 2018, 08:09:17 PM
I just find VLIDE if it decides there is an error in your code is very hard to reset at times. Maybe I am using it wrong.

The other thing I tend to do wether its good or bad is test my code as I go, I just keep pasting to command line. I cheat on repeats etc say testing for 2 items. Then test for all items.
Title: Re: Recomended Autolisp editor?
Post by: Hypersonic on March 29, 2018, 06:17:02 PM
I started using notepad++ and it has on the fly parenthesis matching, excellent search and replace and search and replace over multiple open files.
It also has multi line "commenting out" capability which is a godsend.

I use File Locator pro to find references to functions then assigned the default editor to Notepad++ it seems to be a good combination of tools.

While Notepad++ is not perfect, it is worlds better than just notepad. UGH can't believe I have not tried something better after all these years.

I still need to learn vlide and perhaps will.

I might try out ultraedit some more. it seemed tricky, not sure I liked the format, although it did look like you could customize it to your liking.

So far Notepad++ seems to be really helping.

Thank you all for the input. I will be trying some of these other suggestions as well.  The drag and drop into vlide should help as well
Title: Re: Recomended Autolisp editor?
Post by: cmwade77 on March 29, 2018, 07:19:19 PM
i wonder why some of you guys do not like VLIDE?
it has syntax highlighting, auto format, lots of debugging features, console, it supports projects...
Because when it crashes, it often brings all of AutoCAD down with it, which then can mean lost work for me. Autosave helps to a point, but only to a point.
Title: Re: Recomended Autolisp editor?
Post by: rkmcswain on March 30, 2018, 09:44:39 AM
i wonder why some of you guys do not like VLIDE?


It's not perfect, but it is pretty good. Of course Autodesk didn't write it.

I've been using BLADE, the lisp UI/Editor for BricsCAD more since it was released though.
Title: Re: Recomended Autolisp editor?
Post by: xiebuwanderiji on July 13, 2018, 05:08:39 AM
You can use "edit plus"
Title: Re: Recomended Autolisp editor?
Post by: PKENEWELL on July 24, 2018, 02:11:23 PM
I use PSPad and VLIDE together. I like PSPad better for search, Indenting, syntax coloring, and the function list feature, which is wonderful for navigating large code projects. When it comes to troubleshooting though, nothing matches the go ol' VLIDE editor. PSPad is similar to Notepad++. I wrote and update the Visual Lisp syntax file for it.

The VLIDE editor is OK as far as the user interface, but is clunky IMHO. It also was crashing all the time when I tried changing the syntax colors (I despise the default colors).