From 2e4fb600d467b431dcb10d0e818867fe6926387e Mon Sep 17 00:00:00 2001 From: EGOIST <0x142857@gmail.com> Date: Wed, 24 Aug 2016 12:51:24 +0800 Subject: [PATCH] use soft tabs --- src/components/main.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/main.vue b/src/components/main.vue index d0c4172..e850757 100644 --- a/src/components/main.vue +++ b/src/components/main.vue @@ -379,8 +379,13 @@ scrollbarStyle: 'simple', autofocus: true, dragDrop: false, + tabSize: 2, extraKeys: { - Enter: 'newlineAndIndentContinueMarkdownList' + Enter: 'newlineAndIndentContinueMarkdownList', + Tab(cm) { + const spaces = Array(cm.getOption('indentUnit') + 1).join(' ') + cm.replaceSelection(spaces) + } } })