Open main menu

CDOT Wiki β

Changes

How to set up tab spaces

1,786 bytes added, 19:05, 23 May 2010
Created Page with Notepad++ & Visual Studio Sub sections
=How To Set-Up Tab Spaces=

This page will describe how to set up certain IDEs and Text Editors to not use the default tab character (\t) when the Tab key is pressed and instead use a predefined number of regular space characters instead. This is useful because when importing/exporting to different editors and or platforms these tab characters can be read differently causing code to not be displayed in it's original intended form


==Notepad++ v5.6.6==
<i>This part uses Notepad++ v5.6.6 to set up tab spaces. Other versions should still be similar.</i>

To change the default action of the tab key:

<ol>
<li>Click on the <b>Settings</b> menu</li>
<li>Select <b>Preferences</b></li>
<li>Go to the <b>Language Menu/Tab Settings</b> tab</li>
<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 3, 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 spaces when the Tab key is pressed instead of the default \t.



==Visual Studio==
To change the default action of the tab key:

<ol>
<li>Click on the <b>Tools</b> menu</li>
<li>Select <b>Options...</b></li>
<li>Click the <b>+</b> beside <b>Text Editor</b></li>
<li>Click the <b>+</b> beside <b>All Languages</b> (or whatever language you want)</li>
<li>Select <b>Tabs</b></li>
<li>Type 3 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>
</ol>

This should set up all newly opened documents to insert 3 spaces when the Tab key is pressed instead of the default \t.

<br /> <br /> <br />
1
edit