Posted On: Thursday, August 21st, 2008 (General)
Posted by: Paul Lefebvre

One of my favorite features of Visual Studio was that it auto-corrected the case of keywords (when using VB) after you hit return on a line. So for example, if I typed:

if personName = "Paul" then

Visual Studio would immediately convert it to:

If personName = "Paul" Then

A small thing, I know. But I have OCD when it comes to my code. And I find mixed case to be much easier to read.

I’m a pretty good typist so I just type my REALbasic code the way I want it, but I’ve always wished it could do what Visual Studio did.REALbasic 2008ScreenSnapz001.png

Well on the Betas e-mail list, Bob K. asked about a feature (not new to the beta) that I hadn’t noticed: Standardize Format. You access it from the contextual menu (right-click) when you have code selected.

This magical command auto-corrects all the keywords in the selected code.

I love it! Now I can bang out code and quickly fix it to meet my standards. And more importantly, I can easily fix other people’s code so that it is “right”. :-)

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

This entry was posted on Thursday, August 21st, 2008 at 1:57 pm and is filed under General. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

7 Responses to “Standardize Format”

  1. Brad Rhine on August 21st, 2008 at 8:08 pm

    Holy crap! That’s awesome! When did that get added to REALbasic?

  2. Paul Lefebvre on August 21st, 2008 at 9:21 pm

    I just did some checking and I’m afraid it was added to REALbasic a LONG time ago…

    It first appeared in REALbasic 2005 Release 3!!!!

  3. PaulG on August 23rd, 2008 at 2:30 pm

    Wow! That is awesome. I was always using autocomplete to let it convert it to proper display but it is a pain for some things like integer, if, then, end if, etc… Great discovery! I wonder what other gems are in there that most people didn’t know about.

  4. Bob Keeney on August 24th, 2008 at 5:16 pm

    Well, to be honest, I have a bit of a problem with only being able to access certain commands via the contextual menu. Sure, Microsoft and even Apple do it all the time, but that doesn’t make it right.

    Maybe I’m just old school and just don’t think to right click on objects. Must be a sure sign that I’m getting old.

  5. Christian on August 26th, 2008 at 8:30 pm

    Wow! That is cool. Does it auto-fix spacing too? Such as changing:
    if a=5 then

    to

    if a = 5 then

  6. Christian on August 27th, 2008 at 6:07 pm

    To answer my own question… no, it does not.

  7. devulder on October 8th, 2008 at 10:57 am

    You have a utility for standardize all source code
    of realbasic.
    http://rgb.free.fr/rb/demo/Print_Color_Tools.zip

Leave a Reply