Author Topic: General question about VLIDE and Coding  (Read 5779 times)

0 Members and 1 Guest are viewing this topic.

StykFacE

  • Guest
General question about VLIDE and Coding
« on: December 14, 2011, 09:57:00 AM »
Hello to all. I just have a general question that I've actually always been curious about. I was wondering how y'all handle "code formatting" when you are deep into programming? I know when I'm monkeying around with simple code, or modifying another person's program to fit my needs, I notice that when I Tab over it doesn't look as spaced out or clean as some (or most) of the main programmers I see on this board and the CADTutor.net site.

Is this a manual process to literally Spacebar over "x" amount of character space to get it how y'all like it? Or is there a super secret method that guys like me don't know about?

Here is a screenshot of a program that I have. I made it about 4 years ago but half of it was helped by someone over at CADTutor.net IIRC. I'm starting to get around better with the VLIDE, for instance I know how to use the "Load Active Edit Window" and "Load Selection", which is nice when I'm monkeying around with things.



Just trying to learn from the pro's is all. Thanks in advance.  :kewl:

ronjonp

  • Needs a day job
  • Posts: 7529
Re: General question about VLIDE and Coding
« Reply #1 on: December 14, 2011, 10:04:14 AM »
CTRL-ALT-F  :-)


Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: General question about VLIDE and Coding
« Reply #2 on: December 14, 2011, 10:05:20 AM »
I don't use the vlide, I use Textpad or UltraEdit 99% of them time, and in both the tab key is smart (tab and shift tab) -- formatting so ez I really don't have to put much effort or thought into it. It would actually be harder for me to write unformatted code because it hurts my eyes so much.
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.comhttp://cadanalyst.slack.comhttp://linkedin.com/in/cadanalyst

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: General question about VLIDE and Coding
« Reply #3 on: December 14, 2011, 10:10:47 AM »
CTRL-ALT-F  :-)
Or click on one of the two triangle icons.
First will format everything, second will only format selected content.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: General question about VLIDE and Coding
« Reply #4 on: December 14, 2011, 10:18:39 AM »
Yep, the "triangle" buttons like attached. Just remember to setup your Tools --> Environment Options --> Visual LISP Format Options to something you like. I prefer not having those default ;_ end of ... comments added all over the place.

About the tab not being a smart-tab, that's sometimes a blessing in disguise. But I hear what MP's saying! In some instances I hate the way VS formats the code as soon as you close the brackets, but usually that can be fixed through some settings.

Where VLIDE (for me) falls far short of others is with folding and code completion / intellisense.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: General question about VLIDE and Coding
« Reply #5 on: December 14, 2011, 10:21:00 AM »
irneb, what are you using to make your screenshots?
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

dgorsman

  • Water Moccasin
  • Posts: 2437
Re: General question about VLIDE and Coding
« Reply #6 on: December 14, 2011, 10:23:47 AM »
I've gotten annoyed at tab-formatting so often, I set tabs to insert spaces rather than tab characters.  Seems to work out better that way.  That way, when its opened on other computers it doesn't matter what their tab "width" is set to.
If you are going to fly by the seat of your pants, expect friction burns.

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

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: General question about VLIDE and Coding
« Reply #7 on: December 14, 2011, 10:29:52 AM »
Oh, and BTW your comments will be formatted stragely. There's a trick in VLIDE where it depends on the 1st few characters of a comment how it will get formatted. E.g.

I'm using XNView to do screen captures. Just because I'm used to it.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: General question about VLIDE and Coding
« Reply #8 on: December 14, 2011, 10:32:09 AM »
I've gotten annoyed at tab-formatting so often, I set tabs to insert spaces rather than tab characters.  Seems to work out better that way.  That way, when its opened on other computers it doesn't matter what their tab "width" is set to.
+1
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: General question about VLIDE and Coding
« Reply #9 on: December 14, 2011, 10:32:24 AM »
I'm using XNView to do screen captures. Just because I'm used to it.
Cool. I don't mind using print screen and pasting into paint/photoshop, but an actual screen capture to file would be nice. Thanks.

Sorry for the thread jack. Resume regular programming.
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

nivuahc

  • Guest
Re: General question about VLIDE and Coding
« Reply #10 on: December 14, 2011, 10:42:14 AM »
I'm using XNView to do screen captures. Just because I'm used to it.
Cool. I don't mind using print screen and pasting into paint/photoshop, but an actual screen capture to file would be nice. Thanks.

Sorry for the thread jack. Resume regular programming.

 :angel: cough

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: General question about VLIDE and Coding
« Reply #11 on: December 14, 2011, 10:46:40 AM »
Cool. I don't mind using print screen and pasting into paint/photoshop, but an actual screen capture to file would be nice. Thanks.
Great! I've simply un-learned that habit since one of the keyboards I use goes into that "special M$ keys" at the top and then the Print Screen button doesn't do what it's supposed to.

The XNView thingy isn't actually only used for screen captures though. It's much more comprehensive than that. E.g. I tend to export to PNG from PS and then use XN to batch print. The prints come out 10x faster that way, strange how PS's printing hogs the printer for minutes before anything starts to happen - especially if there's transparencies involved. But not so when exporting to JPG/PNG.

Back on topic: I would definitely love to see a VLIDE update. Perhaps it would be possible to simply use Scintilla for this, it would allow even Intellisense - though not type based due to Lisp being a flexible typed language. But I can't see why it would be impossible to have with showing only function calls directly following an open parenthesis, while only showing variables and other symbols directly following a space. It would make mistypes a lot less prevalent.

And for huge LSP files, folding is an absolute MUST! And then just for fun  :lmao: I'd also adore being able to use regular expressions in Search & Replace, not just the usual wild-card matching.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: General question about VLIDE and Coding
« Reply #12 on: December 14, 2011, 10:51:29 AM »
I'm using XNView to do screen captures. Just because I'm used to it.
Cool. I don't mind using print screen and pasting into paint/photoshop, but an actual screen capture to file would be nice. Thanks.

Sorry for the thread jack. Resume regular programming.

 :angel: cough
Very nice. Thanks. :)
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

alanjt

  • Needs a day job
  • Posts: 5352
  • Standby for witty remark...
Re: General question about VLIDE and Coding
« Reply #14 on: December 14, 2011, 10:59:55 AM »
Civil 3D 2019 ~ Windohz 7 64bit
Dropbox