Menu

Indentation Formatting

Trevor Williams
Attachments
bad.png (20997 bytes)
good.png (21606 bytes)

Indentation Formatting

If you have ever looked at someone’s code that seems to have no regard for proper (or even consistent) indentation in their code, you will immediately appreciate TKE’s indentation formatting feature.

To adjust the indentation formatting for an entire file, open the file in an editing buffer and, while the editing buffer is the current buffer, select the “Edit / Indentation / Format Text” menu option. After a few moments, like magic, TKE will automatically adjust the indentation of the entire file.

Hard to Read Code
Hard to Read Code

Easy to Read Code
Easy to Ready Code (and that's why the function failed to compile!)

To adjust a portion of the file, simply highlight the text to adjust, select the same “Edit / Indentation / Format Text” menu option and only the selected text will have its indentation adjusted.

If you want to guarantee that none of your indentation adjustments are accidentally saved to the file (i.e., if you are simply attempting to better understand a piece of code rather than take ownership of said code), simply lock the editing buffer using either the “File / Lock” menu option or right-click on the editing buffer’s tab and select the “Lock” option there. As long as the file is locked, you may make all of the file adjustments that you like without worrying about saving those changes to the file.

Now go and tell that individual that he/she needs to start using TKE with its awesome auto-indentation capabilities so they can start writing some code that everyone can feel better about!


Related

Wiki: Tips & Tricks