Tabs as spaces in editor...
Hello all,
I am trying to use tabs for formating my C code, and I am running into some difficulty setting the editor to use tabs instead of spaces.
In CrossStudio 2.0.3, I right click on the editor and choose Options->Editor Properties, then choosing the Text Editor tab, I verified that Column-mode Tab was set to Yes. In the Languages tab, under C and C++ Settings, I set Use Tabs to Yes, and Tab Size to 8. This still seems to produce tabs as spaces, with a tab width of 2. I attached a screenshot of my editor options dialog.
What am I doing wrong?
thanks,
Jason
/attachments/token/uv862zn4utg1b97
-
Hi Jason,
I think you'll find that if you press the tab key 4 times a tab character will be inserted to replace the spaces, this is because the "Indent Size" property is 2 which would mean that you need to indent 4 times in order for there to be enough room for a tab character.
If you want the tab key to indent the same as a tab character set the "Indent Size" property to be the same as the "Tab Size" property.
Regards,
Jon Elliott
Please sign in to leave a comment.
Comments
1 comment