Changes

Jump to: navigation, search

How to set up tab spaces

1,004 bytes added, 13:46, 30 November 2011
XCode: - updated to reflect differences in XCode 4
<li>Make sure <b>[Default]</b> is selected in the rightmost list</li>
<li>At The bottom right, click the blue underlined number beside the <b>Tab size:</b></li>
<li>Press 32, and press enter</li>
<li>Check <b>Replace by space</b></li>
<li>Click <b>Close</b></li>
</ol>
This should set up all newly opened documents to insert 3 2 spaces when the Tab key is pressed instead of the default \t.  
==Visual Studio==
<li>Click the <b>+</b> beside <b>All Languages</b> (or whatever language you want)</li>
<li>Select <b>Tabs</b></li>
<li>Set <b>Indenting</b> to <b>Smart</b></li> <li>Type 3 2 for both <b>Tab size:</b> and <b>Indent size:</b></li>
<li>Select the <b>Insert spaces</b> radio button</li>
<li>Press Ok</li>
<br/>
 
==Komodo Edit==
<i>Figured I would add this one in here because it was introduced to us by John Samuel during the 2010 Summer semester, for those of you taking INT322 as well.</i>
<ol>
<li>Open up preferences<b>Preferences</b>. On mac it's simply <b>Command+, </b> (literally just hold command and the comma key) and on PC, well hopefully someone can edit to confirm but I imagine it's along the lines of <b>control+p.</b></li> <li>Click on the arrow beside <b>Editor </b> to bring down the further categories for it.</li> <li>Select <b>Indentation.</b></li> <li>Simply enter the <b>desired number of spaces for indents in the appropriate window and hit OK </b> at the bottom.</li>
</ol>
<br />
 
==XCode==
 
 
<i>If you're using a Mac (or Hackintosh), you're most likely using XCode. It can be a little tricky to find the Preferences for indentation, but other than that, it isn't a pain to set up tabs.</i>
 
===XCode 3===
<ol>
<li>Within XCode, select Preferences from the main menu or press <b>Command-,</b>.</li>
<li>Under the tabs, you'll find a left-right scroll bar. Scroll right and select Indentation.</li>
<li>Under Tabs, check "Tab key inserts tabs, not spaces.</li>
<li>In the Tab width field, enter 2.</li>
<li>In the Indent width field, enter 2.</li>
</ol>
 
===XCode 4===
<ol>
<li>Within XCode, select Preferences from the main menu or press <b>Command-,</b>.</li>
<li>Select Text Editing tab. Click Indentation</li>
<li>In the Tab width field, enter 2.</li>
<li>In the Indent width field, enter 2.</li>
<li>You may like to indent wrapped lines by 2 spaces.</li>
</ol>
<br /> <br /> <br />

Navigation menu