diff --git a/CHANGELOG.md b/CHANGELOG.md index 132fad808..9a4d26b98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Handle a variation in a bioformats exception ([#1656](../../pull/1656)) - Increase logging slow histograms ([#1658](../../pull/1658)) - Use paginated item lists ([#1664](../../pull/1664)) +- When in-line editing yaml and other files, the tab key now uses spaces ([#1667](../../pull/1667)) ### Bug Fixes diff --git a/girder/girder_large_image/web_client/views/itemViewCodemirror.js b/girder/girder_large_image/web_client/views/itemViewCodemirror.js index 021db1a4c..17e1c6e48 100644 --- a/girder/girder_large_image/web_client/views/itemViewCodemirror.js +++ b/girder/girder_large_image/web_client/views/itemViewCodemirror.js @@ -214,6 +214,13 @@ var CodemirrorEditWidget = View.extend({ value: this._contents, mode: Formats[this.mimeType].mode, lineNumbers: true, + indentWithTabs: false, + extraKeys: { + Tab: function (cm) { + var spaces = Array(cm.getOption('tabSize') + 1).join(' '); + cm.replaceSelection(spaces); + } + }, gutters: ['CodeMirror-lint-markers'], lint: true, readOnly: this.accessLevel < AccessType.WRITE