clean up
This commit is contained in:
parent
f2dac6ca15
commit
d4d19c2590
|
@ -50,8 +50,11 @@ addhl -group /coffee/code regex \<(break|case|catch|class|const|continue|debugge
|
||||||
# ‾‾‾‾‾‾‾‾
|
# ‾‾‾‾‾‾‾‾
|
||||||
|
|
||||||
def -hidden _coffee_filter_around_selections %{
|
def -hidden _coffee_filter_around_selections %{
|
||||||
|
eval -draft -itersel %{
|
||||||
|
exec <a-x>
|
||||||
# remove trailing white spaces
|
# remove trailing white spaces
|
||||||
try %{ exec -draft -itersel <a-x> s \h+$ <ret> d }
|
try %{ exec -draft s \h + $ <ret> d }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def -hidden _coffee_indent_on_new_line %{
|
def -hidden _coffee_indent_on_new_line %{
|
||||||
|
@ -61,9 +64,9 @@ def -hidden _coffee_indent_on_new_line %{
|
||||||
# filter previous line
|
# filter previous line
|
||||||
try %{ exec -draft k : _coffee_filter_around_selections <ret> }
|
try %{ exec -draft k : _coffee_filter_around_selections <ret> }
|
||||||
# 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 lines beginning with token and ending with ->
|
# 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) | (->) $ <ret> j <a-gt> }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user