diff --git a/src/vs/editor/common/config/defaultConfig.ts b/src/vs/editor/common/config/defaultConfig.ts index 28748ec48681545e2092e8dc0f9c4c5de05feffc..51361684a405abd52baa1fe1927898c105fd859c 100644 --- a/src/vs/editor/common/config/defaultConfig.ts +++ b/src/vs/editor/common/config/defaultConfig.ts @@ -63,8 +63,8 @@ class ConfigClass implements IConfiguration { referenceInfos: true, renderWhitespace: false, - tabSize: 'auto', - insertSpaces: 'auto', + tabSize: 4, + insertSpaces: true, fontFamily: '', fontSize: 0, lineHeight: 0 diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index da54897c2e23917697ea46f8d03f5b23ba371294..599213e39029e60d9283303a97e7f52add9b6db0 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -490,12 +490,14 @@ export interface ICommonEditorOptions { export interface IEditorOptions extends ICommonEditorOptions { /** * Tab size in spaces. This is used for rendering and for editing. - * Defaults to 'auto', meaning the model attached to the editor will be scanned and this property will be guessed. + * 'auto' means the model attached to the editor will be scanned and this property will be guessed. + * Defaults to 4. */ tabSize?:any; /** * Insert spaces instead of tabs when indenting or when auto-indenting. - * Defaults to 'auto', meaning the model attached to the editor will be scanned and this property will be guessed. + * 'auto' means the model attached to the editor will be scanned and this property will be guessed. + * Defaults to true. */ insertSpaces?:any; /** diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index b65cb9d01691b65023167fc915cd91b8ff2dcfc6..77cad786f5535b10864451de896b4df11dede0f4 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -756,7 +756,10 @@ suite('Editor Controller - Cursor', () => { test('Bug 9121: Auto indent + undo + redo is funky', () => { var model = new Model.Model('', thisHighlighter); - var cursor = new Cursor.Cursor(1, new MockConfiguration(null), model, null, false); + var cursor = new Cursor.Cursor(1, new MockConfiguration({ + tabSize: 4, + insertSpaces: false + }), model, null, false); cursorCommand(cursor, H.Type, { text: '\n' }, null, 'keyboard'); assert.equal(model.getValue(EditorCommon.EndOfLinePreference.LF), '\n', 'assert1');