From 05cd0f714c803b2e08ebf1e24e2d02bbaa405154 Mon Sep 17 00:00:00 2001 From: lizz <363664470@qq.com> Date: Mon, 8 Oct 2018 14:11:34 +0800 Subject: [PATCH 1/3] Revert "For maths snippets, use $0 as the placeholder for the body part" This reverts commit cfa2ad2165ba99836d2759fd1c6da2512d6750bd. --- data/commands.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/data/commands.json b/data/commands.json index e99fa1f2f..d34d0cdb9 100644 --- a/data/commands.json +++ b/data/commands.json @@ -7,17 +7,17 @@ }, "lrparen":{ "command":"left(", - "snippet":"left($0\\right)", + "snippet":"left(${1}\\right)${0}", "detail":"\\left( ... \\right)" }, "lrbrack":{ "command":"left[", - "snippet":"left[$0\\right]", + "snippet":"left[${1}\\right]${0}", "detail":"\\left[ ... \\right]" }, "lrcurly":{ "command":"left\\{", - "snippet":"left\\{$0\\right\\\\}", + "snippet":"left\\{${1}\\right\\\\}${0}", "detail":"\\left\\{ ... \\right\\}" }, "frame":{ @@ -27,17 +27,17 @@ }, "latexinlinemath":{ "command":"(", - "snippet":"(${0}\\)", + "snippet":"(${1}\\)${0}", "detail":"inline math \\( ... \\)" }, "latexdisplaymath":{ "command":"[", - "snippet":"[$0\\]", + "snippet":"[${1}\\]${0}", "detail":"display math \\[ ... \\]" }, "curlybrackets":{ "command":"{", - "snippet":"{$0\\\\}", + "snippet":"{${1}\\\\}${0}", "detail":"curly brackets \\{ ... \\}" }, "title":{ @@ -591,5 +591,5 @@ "command":"vec", "snippet":"vec{$1}" } - + } From 92d0471e30c4d9247ce3474fcb2f137521d0b619 Mon Sep 17 00:00:00 2001 From: lizz <363664470@qq.com> Date: Mon, 8 Oct 2018 14:19:40 +0800 Subject: [PATCH 2/3] auto close before \ --- syntax/syntax.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syntax/syntax.json b/syntax/syntax.json index 26d2bf0a4..efb6c7432 100644 --- a/syntax/syntax.json +++ b/syntax/syntax.json @@ -31,5 +31,6 @@ "start": "^\\s*%\\s*#?region\\b.*", "end": "^\\s*%\\s*#?endregion\\b.*" } - } + }, + "autoCloseBefore": ";:.,=}])>\\` \n\t" } From 76a8d99aa78169b3538f351451a56af8a126a97d Mon Sep 17 00:00:00 2001 From: lizz <363664470@qq.com> Date: Mon, 8 Oct 2018 14:29:35 +0800 Subject: [PATCH 3/3] sorry forgot $ --- syntax/syntax.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/syntax.json b/syntax/syntax.json index efb6c7432..8bbb9961c 100644 --- a/syntax/syntax.json +++ b/syntax/syntax.json @@ -32,5 +32,5 @@ "end": "^\\s*%\\s*#?endregion\\b.*" } }, - "autoCloseBefore": ";:.,=}])>\\` \n\t" + "autoCloseBefore": ";:.,=}])>\\$` \n\t" }