+42
Completed

Spaces instead tabs for indentation (soft tabs)

Curtis King 9 years ago updated by Alexander Blach (Developer) 9 years ago 12
It would be nice to have the option to indent using spacing instead of tabs.
I assume you're talking about the auto-indentation? Textastic looks at the current line. If there are tabs in front of the first character, it uses tabs, if there are spaces, it uses spaces.

Or do you mean that hitting the "tab" key should insert spaces instead of a tab character?
+1
Yes, there should be an option where hitting the tab key should insert spaces instead of a tab character. This is quite standard on programmer text editors for desktops.
I mean when you hit the tab key. Indentation using spaces always never a tab. See Xcode 4 "Text Editing" options:

Prefer indent using: Spaces / Tabs
Tab key: Indents always / Indents in leading Whitespace / Inserts tab character

These are standard editor options, for example Xcode 3, emacs, vim all have similar options.

Thanks.
There should be an option for using spaces instead of tabs, so that pressing the Tab key inserts e.g. 4 spaces. I never want tabs in my files. What makes it even worse right now is that even when I explicitly enter 4 spaces, the editor *changes* them into tabs.
Well, the extension of spaces to tabs actually isn't done by Textastic but by the TextExpander snippet expansion.

So you can either disable TextExpander support in Textastic's settings (if you haven't installed TextExpander on your device) or you can deactivate this in the TextExpander app.
Yes, I heartily agree with this! Changing my tab preference to soft tabs is the first thing I do in any text editor. I can't stand hard tabs. Would love to see this option implemented.
I would also like to see this, as it stands right now I always have to edit my code on a computer to convert tabs to spaces after I work on it on Textastic.
I think what users are requesting here is misunderstood by the developer.

We are requesting the soft-tabs feature like the one in Textmate, which convert tab key strikes into a sequence of predefined spaces.

It is really useful and I dare say indispensable to Python and Ruby programmers.


Please make our life's easy And implement soft tabs on the app :)
Couldn't have said it better myself. I find this feature indispensable in any code editor.
My two cents here as well. I would love to even be able to turn this on for certain filetypes; thus, I can customize it to where Python will do 4-space soft tabs when the tab key is hit, and HTML will still insert a hard tab.
Agreed - the lack of soft indent (spaces for tabs) - it is automatically converting 4 spaces to tabs on any new line, as well as rendering the tab key unusable.  The majority of *nix based devs use spaces instead of tabs - (this bud's 4 u Mountain Dew swilling guy listening to They Might be Giants with huge headphones.).

Solution? i wrote a script to filter all text files in my dropbox folder on my server and replace tab chars with 4 spaces whenever a timestamp change is detected on any file: yes, just to address this problem.  For some languages, this breaks the programs, for others it just creates a mess that's guaranteed to explode in your face the first time you run a regex search and replace across a directory.  
Please fix so I don't have to write my own code editor ... pretty pretty pls. with cherries on top ;)

This proves to be more of an annoyance than a deal breaker, but its close. If I were developing in Python primarily, it would be a rather no brainer.

The ability to delimit the method used for "tabbing" is of great impact to languages that are whitespace aware.

As an aside: The annoyance reason is that Textmate (and other apps) provide simple bundles for converting tabs to spaces, and since the character code (^I) is easily scripted and replaced with 4 spaces.

However, if Textastic wants (and it appears that it does) to become the "TextMate" of the iPad, I would consider this an essential feature, especially as even more droves of developers head to the whitespace aware languages that have been mentioned here.

In any case, *voted* for this one.

Love the font choices though, happy to see DejaVu :)