SciTE: can't type tab character in makefile

1

Some background: I used SciTE to edit my makefiles without issues until recently, when I changed the tab settings by adding these lines to cpp.properties:

tabsize=2
indent.size=2
use.tabs=0

And from I remember, everything still worked okay (I was editing both a makefile and a .cpp file).

That was about two weeks ago. Now I literally cannot type a tab character when editing a makefile, which requires a hard tab to work. Every tab character is turned into 4 spaces. (I search for "\t" and "    " to determine which is which.) Ironically, if I edit a .cpp file, I get an honest-to-goodness tab character (with a 4-space width) despite the settings above still in place. I have the lines below in my SciTEGlobal.properties, and I even added that to my others.properties and SciTEUser.properties, to no effect.

tabsize=4
indent.size=4
use.tabs=1

Wherenelse should I look? Something else is controlling my settings other than these files. Thanks.

update I've answered the question myself below.

bongbang

Posted 2013-11-13T23:08:43.080

Reputation: 133

Answers

0

It appears that adding tab settings in <filetype>.properties will have no effect. Only the SciTEGlobal and SciTEUser can take the settings. Since the former is meant to be left as default, the latter is the one you should edit. To tailor a tab setting to a specific file type, just add a filepattern modifier. For example, my SciTEUser file now has the following lines, and Scite is behaving the way I want it to.

# Tab
tabsize=4
tab.size.$(file.patterns.cpp)=2
indent.size=4
indent.size.$(file.patterns.cpp)=2
use.tabs=0
use.tabs.$(file.patterns.make)=1
tab.indents=1
tab.indents.$(file.patterns.make)=0
backspace.unindents=1
indent.automatic=1
tab.timmy.whinge.level=1

Credit goes to Laura Michaels for an informative writeup on this and much more: SciTE Tips.

bongbang

Posted 2013-11-13T23:08:43.080

Reputation: 133