javascript.kak: fix indent on closer token

This commit is contained in:
Alex Leferry 2 2014-07-16 13:56:40 +02:00
parent e6699c66ed
commit cd656ae4eb
2 changed files with 8 additions and 8 deletions

View File

@ -47,10 +47,10 @@ def -hidden _javascript_filter_around_selections %{
} }
def -hidden _javascript_indent_on_char " def -hidden _javascript_indent_on_char "
eval -draft -itersel ' eval -draft -itersel %_
# indent closer token to its opener # align closer token to its opener when alone on a line
try %_ exec -draft gh <a-k> ^\h*[]}] <ret> m <a-&> _ try %/ exec -draft <a-h> <a-k> ^\h+[]}]$ <ret> m s \`|.\' <ret> 1<a-&> /
' _
" "
def -hidden _javascript_indent_on_new_line " def -hidden _javascript_indent_on_new_line "

View File

@ -34,10 +34,10 @@ def -hidden _json_filter_around_selections %{
} }
def -hidden _json_indent_on_char " def -hidden _json_indent_on_char "
eval -draft -itersel ' eval -draft -itersel %_
# indent closer token to its opener # align closer token to its opener when alone on a line
try %_ exec -draft gh <a-k> ^\h*[]}] <ret> m <a-&> _ try %/ exec -draft <a-h> <a-k> ^\h+[]}]$ <ret> m s \`|.\' <ret> 1<a-&> /
' _
" "
def -hidden _json_indent_on_new_line " def -hidden _json_indent_on_new_line "