Sublime Forum

Tab key always generates spaces in header files (xxx.)

#1

Just when I thought I had the tab thing figured out, a new problem came up. Only in xxx.h files (C header files), the tab key generates one space. It works correctly (generates a tab char) in my xxx.c files. I tried searching around in the preferences and couldn’t find it. Licensed copy of Build 4180, Windows 10. I already fixed the View > Indentation and detect_indentation settings to get tabs to work correctly, but apprently it’s only correct in .c files.

Any suggestions appreciated,
Lloyd

0 Likes

#2

Under View > Indentation is the Tab Width 1? If it isn’t and tab is still only inserting one space then you’ve likely got a keybinding doing that.

0 Likes

#3

The tab width was set to one. I have no idea how that happened, because I had just set it to 4 a day previously, but thank you very much for helping me.
Lloyd

0 Likes

#4

If you have "detect_indentation" enabled - it’s enabled by default - Sublime Text will detect and set the indentation when you open a file. It’s likely detecting 1 space for that file.

1 Like