make auto-indenting after start structure more robust

This commit is contained in:
Alex Leferry 2 2016-02-03 09:12:26 +01:00
parent 85383e7083
commit 1aed03aaf9

View File

@ -66,7 +66,7 @@ def -hidden _coffee_indent_on_new_line %{
# copy '#' comment prefix and following white spaces # copy '#' comment prefix and following white spaces
try %{ exec -draft k x s ^ \h * \K \# \h * <ret> y j p } try %{ exec -draft k x s ^ \h * \K \# \h * <ret> y j p }
# indent after start structure # indent after start structure
try %{ exec -draft k x <a-k> ^ \h * (case|catch|class|else|finally|for|function|if|switch|try|while|with) | (->) $ <ret> j <a-gt> } try %{ exec -draft k x <a-k> ^ \h * (case|catch|class|else|finally|for|function|if|switch|try|while|with) \b | (->) $ <ret> j <a-gt> }
} }
} }