Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How does one change the tabstop in TextEdit.app for Snow Leopard?

The current tabstop is 8 spaces. I would like to change this to 4 spaces.
Is there any way to achieve this?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Yes.

  1. Make sure Format > Text > Show Ruler is enabled.
  2. Locate the tab stops in the ruler (Fig. 1).
  3. Move the first one to 1/4 inch (Fig. 2).

Fig1 Fig2 Alternatively, you could use something like Keyboard Maestro, TextExpander, or BetterTouchTool to map four spaces to the Tab key. This is the only way I'm aware of to do it for plain text files (.txt).

share|improve this answer
2  
If your document has existing content, select all of the content before making this adjustment so the tab stops are applied to all of the paragraphs. –  bneely Feb 11 '12 at 21:24
2  
This works for rich text documents. It seems not to show a ruler for plain text documents. I'll keep this in mind. Thanks! –  phwd Feb 11 '12 at 21:52
    
Oh, sorry, didn't realize it didn't work for .txt files. Oh well! –  timothymh Feb 12 '12 at 1:24
    
@phwd Added an alternative for .txt files. :) –  timothymh Apr 4 '12 at 20:49
    
Sweet looking into them now –  phwd Apr 4 '12 at 20:55

TextEdit bases its tabs on distances, not number of characters.

If I set the text to 30pt, the tabs are four spaces. At 14pt, they are eight spaces.

Consequently, there is no set "number of spaces" that could ever be modified.

One solution is to:

  1. change your font preferences for RTF files to match my TXT preferences.

  2. temporarily convert your TXT files to RTF while editing (cmd-shift-T).

(do some editing)

  1. convert back to TXT when you quit (cmd-shift-T).

The RTF tabs default to 4 spaces for me -- it depends on the font and size.

share|improve this answer

A kindly soul has slightly modified TextEdit to add a field, "Tab Width", at the bottom of the "New Document" tab of the "Preferences" window.

Type in a number between 1 and 100 (inclusive) and it will change the width of tabs to that number (in character widths).

Download at code.google.com.

Since I couldn't replace the main TextEdit app, I used "show package contents" and replaced the inside of the app.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.