Skip to content

Commit bc696a2

Browse files
jakebaileyDonJayamanne
authored andcommitted
Indent on enter after line continuations (#3915)
For #3284.
1 parent c0b27c0 commit bc696a2

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

news/1 Enhancements/3284.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Indent on enter after line continuations.

src/client/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ export async function activate(context: ExtensionContext): Promise<IExtensionApi
162162
beforeText: /^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async)\b.*:\s*/,
163163
action: { indentAction: IndentAction.Indent }
164164
},
165+
{
166+
beforeText: /^(?!\s+\\)[^#\n]+\\\s*/,
167+
action: { indentAction: IndentAction.Indent }
168+
},
165169
{
166170
beforeText: /^\s*#.*/,
167171
afterText: /.+$/,

0 commit comments

Comments
 (0)