Author Topic: Beautify Your Code - Via Hotkey  (Read 4666 times)

StuC_Ovine

  • Guest
Beautify Your Code - Via Hotkey
« on: 2009-Sep-04 »
Little app I use internally - thought others might like it. (win32)

It beautifys your code on the press of a defined hotkey. ( Auto indents your code )

It works by using your clipboard to take a copy of your source (from a valid text box / IDE  etc),  processes it then pastes it back.  

It will autosense (hopefully) what codebase you are using (as it works with VB, blitz3d, Blitzmax and now GLbasic).



Grab the file from http://baa.ovine.net/codeformat.zip


/Stu
www.ovine.net
 

Offline D2O

  • Prof. Inline
  • *****
  • Posts: 1061
    • View Profile
    • http://www.deuteriumoxid.com
Re: Beautify Your Code - Via Hotkey
« Reply #1 on: 2009-Sep-04 »
Cool  :good: und ein wirklich gut zu gebrauchendes program.

Scheint recht gut zu laufen.
Danke.


Jetzt muss nur noch ein Makro her um es aus der IDE zu starten.
;---------------------------------------------
Cool: good: and one really per-grief well to be used.

Seem to run properly well.
Thanks.

Now must to only start therefore a macro from the IDE.
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Offline Marmor

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 908
  • 96A285CC
    • View Profile
    • my youtube channel
Re: Beautify Your Code - Via Hotkey
« Reply #2 on: 2011-Jan-30 »
hat das noch jemand ?

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Beautify Your Code - Via Hotkey
« Reply #3 on: 2011-Apr-01 »
Dead link :(

Offline D2O

  • Prof. Inline
  • *****
  • Posts: 1061
    • View Profile
    • http://www.deuteriumoxid.com
Re: Beautify Your Code - Via Hotkey
« Reply #4 on: 2011-May-15 »
Ich habe StuC mal eine Mail geschickt.
Vieleicht setzt er einen neuen Link.

Ich gebe bescheid falls eine Antwort kommt.

I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Offline felix330

  • Mc. Print
  • *
  • Posts: 26
    • View Profile
Re: Beautify Your Code - Via Hotkey
« Reply #5 on: 2011-May-15 »
Found it! The codeformat.exe still seems to be on the server. http://ovine.net/download.php?dl=codeformat .
Edit:works great :)
« Last Edit: 2011-May-15 by felix330 »

Offline D2O

  • Prof. Inline
  • *****
  • Posts: 1061
    • View Profile
    • http://www.deuteriumoxid.com
Re: Beautify Your Code - Via Hotkey
« Reply #6 on: 2011-May-15 »
Thanks :good:
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Beautify Your Code - Via Hotkey
« Reply #7 on: 2011-May-16 »
Thank you!  :nw:

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Beautify Your Code - Via Hotkey
« Reply #8 on: 2011-May-16 »
It's not working very well for me, it can't detect the ENDFUNCTION.

Code: GLBasic [Select]
// get map width (tiles)
FUNCTION MapWidth: map
        RETURN LAYERS[map].getWidth()
        ENDFUNCTION
       
        // get map height (tiles)
        FUNCTION MapHeight: map
                RETURN LAYERS[map].getHeight()
                ENDFUNCTION
               
                // get tile width (pixels)
                FUNCTION TileWidth: map
                        RETURN LAYERS[map].TWidth
                        ENDFUNCTION
 

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: Beautify Your Code - Via Hotkey
« Reply #9 on: 2011-May-16 »
Try my beautifier. Not as nice as the Ovine one but might work still? :-)
http://gamecorner.110mb.com/index.php?page=beautify

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2606
    • View Profile
Re: Beautify Your Code - Via Hotkey
« Reply #10 on: 2011-May-16 »
Id like to know how he gets in/out GLBasic. He copies all the code into the pastes buffer, changes it in an external app and then pastes it back in? All seamlessly

I'll maybe contact STU at Ovine and ask him to opensource this old util.
« Last Edit: 2011-May-16 by bigsofty »
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Albert

  • Dr. Type
  • ****
  • Posts: 257
    • View Profile
    • Blog
Re: Beautify Your Code - Via Hotkey
« Reply #11 on: 2011-May-16 »
More: I've already tried your beautifier, but I wanted to try this also. Now I will stick with your script.