force using tabs in makefile and snippets modes
This commit is contained in:
parent
c223f59e1a
commit
36c166b9ed
3 changed files with 6 additions and 5 deletions
|
|
@ -461,7 +461,8 @@ var EditSession = function(text, mode) {
|
|||
* @returns {Boolean}
|
||||
**/
|
||||
this.getUseSoftTabs = function() {
|
||||
return this.$useSoftTabs;
|
||||
// todo might need more general way for changing settings from mode, but this is ok for now
|
||||
return this.$useSoftTabs && !this.$mode.$indentWithTabs;
|
||||
};
|
||||
/**
|
||||
* Set the number of spaces that define a soft tab; for example, passing in `4` transforms the soft tabs to be equivalent to four spaces. This function also emits the `changeTabSize` event.
|
||||
|
|
|
|||
|
|
@ -57,7 +57,9 @@ oop.inherits(Mode, TextMode);
|
|||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = "#";
|
||||
this.lineCommentStart = "#";
|
||||
this.$indentWithTabs = true;
|
||||
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
|
|
|||
|
|
@ -105,9 +105,7 @@ var Mode = function() {
|
|||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
return this.$getIndent(line);
|
||||
};
|
||||
this.$indentWithTabs = true;
|
||||
}).call(Mode.prototype);
|
||||
exports.Mode = Mode;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue