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}
|
* @returns {Boolean}
|
||||||
**/
|
**/
|
||||||
this.getUseSoftTabs = function() {
|
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.
|
* 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.
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ oop.inherits(Mode, TextMode);
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
this.lineCommentStart = "#";
|
this.lineCommentStart = "#";
|
||||||
|
this.$indentWithTabs = true;
|
||||||
|
|
||||||
}).call(Mode.prototype);
|
}).call(Mode.prototype);
|
||||||
|
|
||||||
exports.Mode = Mode;
|
exports.Mode = Mode;
|
||||||
|
|
|
||||||
|
|
@ -105,9 +105,7 @@ var Mode = function() {
|
||||||
oop.inherits(Mode, TextMode);
|
oop.inherits(Mode, TextMode);
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
this.getNextLineIndent = function(state, line, tab) {
|
this.$indentWithTabs = true;
|
||||||
return this.$getIndent(line);
|
|
||||||
};
|
|
||||||
}).call(Mode.prototype);
|
}).call(Mode.prototype);
|
||||||
exports.Mode = Mode;
|
exports.Mode = Mode;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue