Replacing Tabs with Spaces in Aptana (Soft Tabs)

AptanaWhile using Haml in Aptana, I had a problem with line indentation. Since Haml uses space indentation to represent the HTML structure (two spaces for each level), indenting multiple lines with the "tab" characters would result in Haml errors. I tried to search for the word "tab" in Aptana's "Preferences" window but didn't find what I wanted. Here is how to enforce Aptana to replace tabs with regular spaces (soft tabs).

  1. From Aptana "Window" menu, select "Preferences..."
  2. In the the preferences window, select "Aptana" > "Editors"
  3. In the "General" tab of the "Editors" window, select "Use spaces" under "Tab Insertion"
  4. Click the "edit" link besides the "Use spaces" option to open the general "Text Editors" window
  5. In the "Text Editors" window, set the "Displayed tab width" to "2"
  6. Press "OK"
  7. Enjoy two-spaces tabs

Did you like this article? Bookmark it:

Related Articles

1 Comment

Leave a Comment

If you want to post code, do this:
<pre><code class="ruby|javascript|css|html"> your code here </code></pre>