Author Topic: Recomended Autolisp editor?  (Read 5493 times)

0 Members and 1 Guest are viewing this topic.

Hypersonic

  • Mosquito
  • Posts: 8
Recomended Autolisp editor?
« 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!

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Recomended Autolisp editor?
« Reply #1 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.

Hypersonic

  • Mosquito
  • Posts: 8
Re: Recomended Autolisp editor?
« Reply #2 on: March 20, 2018, 08:08:59 PM »
Well shoot, that just might solve my only complaint!
Thanks Lee!


Hypersonic

  • Mosquito
  • Posts: 8
Re: Recomended Autolisp editor?
« Reply #3 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!

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Recomended Autolisp editor?
« Reply #4 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 -



However, such bookmarks will unfortunately only persist for the current session.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Recomended Autolisp editor?
« Reply #5 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
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: Recomended Autolisp editor?
« Reply #6 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.
If you are going to fly by the seat of your pants, expect friction burns.

try {GreatPower;}
   catch (notResponsible)
      {NextTime(PlanAhead);}
   finally
      {MasterBasics;}

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Recomended Autolisp editor?
« Reply #7 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)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

JohnK

  • Administrator
  • Seagull
  • Posts: 10648
Re: Recomended Autolisp editor?
« Reply #8 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.
« Last Edit: March 21, 2018, 10:40:23 AM by John Kaul (Se7en) »
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

Grrr1337

  • Swamp Rat
  • Posts: 812
Re: Recomended Autolisp editor?
« Reply #9 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 helps? - I've recieved valuable advices in there.
(apply ''((a b c)(a b c))
  '(
    (( f L ) (apply 'strcat (f L)))
    (( L ) (if L (cons (chr (car L)) (f (cdr L)))))
    (72 101 108 108 111 32 87 111 114 108 100)
  )
)
vevo.bg

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: Recomended Autolisp editor?
« Reply #10 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
A man who never made a mistake never made anything

VovKa

  • Water Moccasin
  • Posts: 1631
  • Ukraine
Re: Recomended Autolisp editor?
« Reply #11 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...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Recomended Autolisp editor?
« Reply #12 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.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: Recomended Autolisp editor?
« Reply #13 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.
A man who never made a mistake never made anything

Hypersonic

  • Mosquito
  • Posts: 8
Re: Recomended Autolisp editor?
« Reply #14 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

cmwade77

  • Swamp Rat
  • Posts: 1443
Re: Recomended Autolisp editor?
« Reply #15 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.

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: Recomended Autolisp editor?
« Reply #16 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.

xiebuwanderiji

  • Guest
Re: Recomended Autolisp editor?
« Reply #17 on: July 13, 2018, 05:08:39 AM »
You can use "edit plus"

PKENEWELL

  • Bull Frog
  • Posts: 319
Re: Recomended Autolisp editor?
« Reply #18 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).
"When you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it." - Theodore Roosevelt