0
当我们格式化代码时,Atom打字稿将制表符空格从2改为4。更改原子打字稿中的制表符空间
我改变formatting.js文件,并将其设置为2而我依然面临着同样的问题..
我怎样才能改变原子打字稿的标签空间?下面
是formatting.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Maintainance:
* When a new option is added add it to:
* - the FormatCodeOptions interface
* - the defaultFormatCodeOptions function
* - the makeFormatCodeOptions function
*/
const os_1 = require("os");
function defaultFormatCodeOptions() {
return {
baseIndentSize: 2,
indentSize: 2,
tabSize: 2,
newLineCharacter: os_1.EOL,
convertTabsToSpaces: true,
indentStyle: "Smart",
insertSpaceAfterCommaDelimiter: true,
insertSpaceAfterSemicolonInForStatements: true,
insertSpaceBeforeAndAfterBinaryOperators: true,
insertSpaceAfterKeywordsInControlFlowStatements: true,
insertSpaceAfterFunctionKeywordForAnonymousFunctions: false,
insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false,
insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false,
insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false,
insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false,
placeOpenBraceOnNewLineForFunctions: false,
placeOpenBraceOnNewLineForControlBlocks: false,
};
}
exports.defaultFormatCodeOptions = defaultFormatCodeOptions;
//# sourceMappingURL=formatting.js.map
您是否在编辑器设置中检查过? – Baruch
是的,编辑器选项卡的长度设置为2. Atom - > preferences - > editor - > Tab Length – prranay
当我使用atom-typescript格式化代码时,它将标签空格从2更改为4. – prranay