AnyEdit, a great plugin for Eclipse based IDE’s


Anyone who has ever done any amount of work with me knows that I am a little bit of a “Code Nazi.”  I am not a fan of tab-indented coding because on a busy page I do not want to keep scrolling into the middle of next week just to get to the end of a line.  I prefer indenting each new level of code with a space because it is just as easy to interpret and nesting several layers deep does start almost off the page.

As I mentioned before I have switched to Aptana for development recently and that is one of the best changes I have made in a long time.  Aptana has quite a few settings in the preferences for handling tabs in the editor.  Unfortunately, changing these settings seem to only affect how the editor displays the code.  If you save a file and open it in another editor, the tabs will display as tabs again and again the nesting will be off the page.

Well today I could not take it any more and I set out looking for a solution to the problem.  Then I came across a nice little plugin called AnyEdit.  AnyEdit will allow you to convert tabs to spaces as well as clean up any trialing whitespace after tags.  Definitely worth checking out if do not like the nested tabs either.

Advertisements

About Robert Zehnder

Web application developer specializing in ColdFusion/Railo and Open Source development.

Posted on December 1, 2010, in Aptana, CFEclipse and tagged , . Bookmark the permalink. 4 Comments.

  1. Is not the idea of using tabs being that the coder can decide how much space is displayed for a tab? One developer likes big 4 space tabs (me), another only likes one space (you). With tabs we can share code and keep our own preferences. With a single space – I have to cope with your ‘Code Nazi; preferences :p

    Eclipse -> Editors -> Text Editor -> Displayed Tab Width

    (?)

    Dominic

  2. “I do not want to keep scrolling … to the end of a line”

    Then don’t write long lines of code!

    In most languages, you can put a newline anywhere you can put a space, so the line doesn’t get that lone.

    And any time you’ve got more than 3 levels of indent, you should probably move the code block to a sensibly named function, and it’ll be easier to both read and understand.

    Also, you can still use tabs to indent, and simply set the tab width to 1, and it’ll look the same to you, but also be readable by people that prefer their indents to be 2/3/4/5/8 wide.

  3. Both are valid points. I do have my indention set to spaces while I am work in the editors so while I am working everything lines up correctly. The nice part about AnyEdit is you can manually remove tabs by right-clicking on your document and replace the tabs in the context menus. AnyEdit also has options to automatically replace tabs with spaces when you save your document.

    When I am working with other developers outside of work I will generally forgo this since many of my friends love their tabs. 🙂

  1. Pingback: 2010 in review « KISDigital Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: