Raised This Month: $ Target: $400
 0% 

Code beautifier for PAWN


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 07-29-2008 , 18:13   Code beautifier for PAWN
Reply With Quote #1

When writing AMXX/SM code,I have the bad habit to forget all good spacing/indenting rules. I started to get affected by my own mess,so I went looking for something that organizes PAWN code. And i found this:

http://sourceforge.net/projects/uncrustify/

Does exactly what I needed,and it comes with a configuration for AMXX, which you can modify as you wish.
danielkza is offline
micke1101
Veteran Member
Join Date: Jan 2008
Location: Banned-town
Old 07-29-2008 , 18:21   Re: Code beautifier for PAWN
Reply With Quote #2

What if you use amxx studio for coding you can just go to Tools >> Indentier
or just press Strg + i
micke1101 is offline
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 07-29-2008 , 18:44   Re: Code beautifier for PAWN
Reply With Quote #3

I doesn't do just indenting, it can change spacing, newlines, aligning, add semicolons, and all this is configurable based on each language element. It can also 'compress' comments, change them to C Style, among other stuff. If you don't want to,don't use it.
danielkza is offline
Pro Patria Finland
Senior Member
Join Date: Apr 2006
Location: BaronPub.com
Old 07-29-2008 , 18:55   Re: Code beautifier for PAWN
Reply With Quote #4

I can imagine this tool being useful when you get a script that's been done poorly. Other than that, every programmer should automatically write by indenting rules, without forgetting semicolons etc. The more you script, the more these things happen automatically. I don't even think about stuff like this when programming nowadays, and I know most people here don't.
__________________
I am not a number. I am Gordon Freeman!
Pro Patria Finland is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 07-29-2008 , 19:51   Re: Code beautifier for PAWN
Reply With Quote #5

Nice! I like this ;) As long as its "clean". I agree, it helps to read a complete noobs code, even though I wont look at it unless he cleans up his crap.
Styles is offline
Send a message via AIM to Styles
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 07-30-2008 , 00:15   Re: Code beautifier for PAWN
Reply With Quote #6

Quote:
Originally Posted by Pro Patria Finland View Post
I can imagine this tool being useful when you get a script that's been done poorly. Other than that, every programmer should automatically write by indenting rules, without forgetting semicolons etc. The more you script, the more these things happen automatically. I don't even think about stuff like this when programming nowadays, and I know most people here don't.
The problem is most of the time I write my code in 'bursts'. Indenting is minor problem since I got used to it,but I almost never remember to space function arguments, for example.
danielkza is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode