Aptana: find and replace tabs (with spaces)
Asked Answered
E

3

9

I am belatedly setting up Aptana to use four spaces instead of tabs. I've made the necessary changes to the preferences so every new tab inserts four spaces.

All the existing tabs remain, however, and so I get Mixed spaces and tab errors. How can you do a Replace all to fix this? I've tried ^t, <TAB> etc but it just searches for these as normal strings. What are the correct ways to specify a space and a tab?

Elbaelbart answered 29/6, 2012 at 22:39 Comment(0)
F
23

I've found myself in similar situation and copying whole source code and repasting it helped me out. Just do as follow on your source code Ctrl+A, Ctrl+C, then Del whole code and Ctrl+V it again. You will get only spaces if have set it in options like you mentioned above.

Fluxion answered 30/6, 2012 at 15:49 Comment(0)
B
5

There's an option in the refactor source menu to convert between tabs and space-tabs.

Barbrabarbuda answered 29/6, 2012 at 22:50 Comment(5)
Fantastic! Ummm... where's the refactor menu? I can't find it!Elbaelbart
Err, sorry, I meant the source menu.Barbrabarbuda
Thanks for the clarification :) My source menu (in 3.1.3...) only allows Format and offers no options. I tried it, but it doesn't seem to change the tabs :(Elbaelbart
I did it! You just select all, cut and re-paste and it formats it for you :)Elbaelbart
No! Not at all. Maybe the Mac version is less fancy :)Elbaelbart
U
1

This worked for me: Edit > Find/Replace... (CTRL+F), check Regular Expressions, type \t and type 4 spaces (I use 4 spaces for tab).

Unpack answered 18/1, 2014 at 18:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.