Code beautify / code cleanup / auto indent?

Hey Team!

I’m finally getting around to try out Corona Editor and I’m wondering where (If?!) the auto indent / code clean up is? Something that, after I paste a chunk of code from the web into my editor, it’s all funked up and not indented. I know intellij/netbeans has the feature called “Auto Format”.

Is there anything like that for Sublime Text 3??? The OCD portion of me is DYIN over here since I have to constantly clean it up. It’s no problem for code I’m coding from scratch with since it auto indents as I’m typing.

Appreciate any help!

-Mario

Have you tried using Google and searching for “sublime text autoformat” or “beautify” or some other key words?   ST is a popular editor and there are plenty of people building add-ins for it.

Rob

"Have you tried using Google and searching for “sublime text autoformat” or “beautify” or some other key words? "

Oh yes indeedy I certainly have! All plugins to cleanup/ auto indent LUA were either only supported for OS X or Linux, or had strange requirements such as pointing to an install directory of LUA, which I steered clear of since I didn’t want to mess with CoronaEditor’s syntax highlighting (wasn’t sure that it would screw up anything with that…)

So everyone using CoronaEditor just naturally types in everything perfectly indented, and manually corrects any paste-ins ’ indentation screwiness to the editor??

Dang, I guess I AM OCD…:slight_smile:

On that note, where’s the feature request board for CoronaEditor? Or should I Google that? :wink:

-Mario

Ah ha! “Edit->Line->Reindent”! It was built in already! And here I was looking for fancy packages!!!

-Mario

http://feedback.coronalabs.com

But it sounds like you found it built in.

Rob

Any time you think something is missing remember that Sublime Text supports 1000s of plugins.  If the built in indentation isn’t to your liking, you might want to look at FormatLua.  It’s a little fiddly to get set up (it requires command line lua) but it might suit.

That’s exactly the one I was looking at, and yeah it was pretty fiddly requiring the Lua binaries or whatever so I steered clear of it.

The “fix” I quoted above “Edit->Line->Reindent” doesn’t work, it chokes on the elseif and NOW I remember this is why I never switched over to any of the Sublime editors. Guess I’m not the only one who bemoans the issue, The Google brought up a ton of various “fixes” for it, all of which I can’t seem to get working on Windows.

Matter of fact, Rob, you commented on how frustrating my very issue was here for Sublime Editor 2:

https://forums.coronalabs.com/topic/49721-ifelseif-formatting-question-sublime-2-related/

And the issue still persists into Sublime Editor 3…!!!

Shame. Back to LUA Glider for now.

-Mario

Have you tried using Google and searching for “sublime text autoformat” or “beautify” or some other key words?   ST is a popular editor and there are plenty of people building add-ins for it.

Rob

"Have you tried using Google and searching for “sublime text autoformat” or “beautify” or some other key words? "

Oh yes indeedy I certainly have! All plugins to cleanup/ auto indent LUA were either only supported for OS X or Linux, or had strange requirements such as pointing to an install directory of LUA, which I steered clear of since I didn’t want to mess with CoronaEditor’s syntax highlighting (wasn’t sure that it would screw up anything with that…)

So everyone using CoronaEditor just naturally types in everything perfectly indented, and manually corrects any paste-ins ’ indentation screwiness to the editor??

Dang, I guess I AM OCD…:slight_smile:

On that note, where’s the feature request board for CoronaEditor? Or should I Google that? :wink:

-Mario

Ah ha! “Edit->Line->Reindent”! It was built in already! And here I was looking for fancy packages!!!

-Mario

http://feedback.coronalabs.com

But it sounds like you found it built in.

Rob

Any time you think something is missing remember that Sublime Text supports 1000s of plugins.  If the built in indentation isn’t to your liking, you might want to look at FormatLua.  It’s a little fiddly to get set up (it requires command line lua) but it might suit.

That’s exactly the one I was looking at, and yeah it was pretty fiddly requiring the Lua binaries or whatever so I steered clear of it.

The “fix” I quoted above “Edit->Line->Reindent” doesn’t work, it chokes on the elseif and NOW I remember this is why I never switched over to any of the Sublime editors. Guess I’m not the only one who bemoans the issue, The Google brought up a ton of various “fixes” for it, all of which I can’t seem to get working on Windows.

Matter of fact, Rob, you commented on how frustrating my very issue was here for Sublime Editor 2:

https://forums.coronalabs.com/topic/49721-ifelseif-formatting-question-sublime-2-related/

And the issue still persists into Sublime Editor 3…!!!

Shame. Back to LUA Glider for now.

-Mario