1
votes

I have trying to set tab size to 2 and replace with spaces for all file types (including my *.cpp files).

In: /home/user/.config/sublime-text-3/Packages/User/Preferences.sublime-settings

I have:

{
  "tab_size": 2,
  "translate_tabs_to_spaces": true
}

I have restarted sublime text but tabs are still 4 and tabs instead of spaces in my .cpp files.

Do I need to convert existing *.cpp files after I made this change?

UPDATE:

Apparently you have to do a Select-all go to View -> Indentation and select the indention size of choice on existing files for it to be applied.

1
I would not expect it to auto update the format of the code. What happens if you select all, copy and then paste?NathanOliver
No effect. I just tried to create a new *.cpp file and then it work. For some reason it has no effect on files before I made the change. You have thought this would have been a rather basic feature - that existing files would be updated.u123
Your update should be an answer.NathanOliver

1 Answers

1
votes

UPDATE:

Apparently you have to do a Select-all go to View -> Indentation and select the indention size of choice on existing files for it to be applied.