This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCSv6 changes tab stops

I've got an assembly project in CCS6, with around 30 component files, and out of the blue, CCS has decided that a couple of the files have tab stops at 4 spaces, instead of 8 spaces.

Where do I set this, and is it settable for individual files (only one or two out of the group are screwed up)?

Later-

  • Hi David,

    The option for this at the global (workspace) level is under: Window -> Preferences

    As far as I know, you can only set this at the workspace level and not on a per file basis. So I'm a little confused why you only see a few files showing this behavior...

    Thanks

    ki

  • What if I want to make sure the "Insert spaces for tabs" setting is set to "true" when I download my project from SVN.  We have several developers working on our project, and it's a bit of a pain for everyone to have to manually go into their CCS settings to change this.  Given that we don't want to check the .metadata tree into SVN, what CCS configuration file and what line contents within the file would specify "insert spaces for tabs" to "true" for everyone?

    Thanks for your help.

    Regards,

    Ben

  • Ben Atkinson said:
    Given that we don't want to check the .metadata tree into SVN, what CCS configuration file and what line contents within the file would specify "insert spaces for tabs" to "true" for everyone?

    If you use File -> Export menu option and then Select General -> Preferences you can export the C/C++ Editor settings made in one workspace to a text .epf file. The .epf file could then be placed in SVN and then manually imported into a difference workspace.

    I have used this to replicate my editor settings between workspaces, and haven't actually investigated in which file(s) under the .metadata tree the editor settings are stored in.

  • Who out there actually managed to get CCS6 to change its tab settings using the description above? I have 3 different projects and this works on NONE of them. Something changed in the CCS6 evolution to prevent this from working properly. Granted, the previous mechanism under Editors-Preferences-tab settings was awkward but at least it worked.

    I am trying to change the tab behavior to 3 spaces, using spaces instead of tab characters. Very frustrating when a simple feature like this doesn't work!

    If anybody has a solution here it would be greatly appreciated...

    Thanks,

    RSH

  • I suspect that some tabs were converted to spaces. I have a program called "retab" for dealing with tab-stop issues. If you want a copy of the source code and documentation, contact me via e-mail to AOL.com; my user name is DAGwyn.
  • I kept digging until I finally discovered the answer. Here is the resolution for all others that may be fortunate to stumble upon this thread...
    In CCS6, Right Click with mouse on the Project name in the Project Explorer window. From there select the "Settings". At the very bottom left corner of the "Settings" dialog is a link "Show/Hide advanced settings". Click on "Show advanced settings". This will make the "C/C++ General" item visible in the components selection window. From there, expand the "C/C++ General" item by clicking on the ">" icon. Then click on the "Formatter" item. Then, in the far upper right corner there is a link "Configure Workspace Settings". Click on "Configure Workspace Settings". This will bring up a "Preferences" dialog. In this "Preferences" dialog, click on the "Edit..." button. This will bring up a "Profile 'CCS'" dialog window. In this window, select the "Tab policy" by clicking on the pull-down box to the right of the "Tab policy" words. Select "Spaces only" if that is what you are looking for (as I was). Then set the "Tab size" to the desired number of spaces you would like for the tab. Hit "OK", "OK", "OK", to back out of the settings and save the new tab configuration. This should fix your tab/space insertion issue.