From 85d9e01c6eb9a03355711bfd0337e810450b16bf Mon Sep 17 00:00:00 2001 From: iraAlor Date: Sat, 29 Oct 2016 22:58:04 -0700 Subject: [PATCH 1/2] Resolves inline if elif else auto-indent, by forcing indentation on all ifs --- settings/language-python.cson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/language-python.cson b/settings/language-python.cson index 60e2aa7..403ab85 100644 --- a/settings/language-python.cson +++ b/settings/language-python.cson @@ -4,5 +4,5 @@ 'softTabs': true 'tabLength': 4 'commentStart': '# ' - 'increaseIndentPattern': '^\\s*(class|def|elif|else|except|finally|for|if|try|with|while)\\b.*:\\s*$' + 'increaseIndentPattern': '^\\s*(class|def|elif|else|except|finally|for|if|try|with|while)\\b.*:.*$' 'decreaseIndentPattern': '^\\s*(elif|else|except|finally)\\b.*:' From 44250fe1dd99aba32dbc6828173f843b179b8aec Mon Sep 17 00:00:00 2001 From: iraAlor Date: Sat, 29 Oct 2016 23:18:29 -0700 Subject: [PATCH 2/2] Makes it so that indentation is enforced on only else's that are not inlined. Indnetation is still enforcd on all if's and elif's --- settings/language-python.cson | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/language-python.cson b/settings/language-python.cson index 403ab85..1a6848f 100644 --- a/settings/language-python.cson +++ b/settings/language-python.cson @@ -4,5 +4,5 @@ 'softTabs': true 'tabLength': 4 'commentStart': '# ' - 'increaseIndentPattern': '^\\s*(class|def|elif|else|except|finally|for|if|try|with|while)\\b.*:.*$' - 'decreaseIndentPattern': '^\\s*(elif|else|except|finally)\\b.*:' + 'increaseIndentPattern': '^\\s*(((class|def|elif|except|finally|for|if|try|with|while)\\b.*:.*)|(else\\b.*:\\s*))$' + 'decreaseIndentPattern': '^\\s*(elif|else|except|finally)\\b.*:\\s*$'