mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-23 15:23:29 +03:00
javascript.kak: fix indent on closer token
This commit is contained in:
parent
e6699c66ed
commit
cd656ae4eb
@ -47,10 +47,10 @@ def -hidden _javascript_filter_around_selections %{
|
||||
}
|
||||
|
||||
def -hidden _javascript_indent_on_char "
|
||||
eval -draft -itersel '
|
||||
# indent closer token to its opener
|
||||
try %_ exec -draft gh <a-k> ^\h*[]}] <ret> m <a-&> _
|
||||
'
|
||||
eval -draft -itersel %_
|
||||
# align closer token to its opener when alone on a line
|
||||
try %/ exec -draft <a-h> <a-k> ^\h+[]}]$ <ret> m s \`|.\' <ret> 1<a-&> /
|
||||
_
|
||||
"
|
||||
|
||||
def -hidden _javascript_indent_on_new_line "
|
||||
|
@ -34,10 +34,10 @@ def -hidden _json_filter_around_selections %{
|
||||
}
|
||||
|
||||
def -hidden _json_indent_on_char "
|
||||
eval -draft -itersel '
|
||||
# indent closer token to its opener
|
||||
try %_ exec -draft gh <a-k> ^\h*[]}] <ret> m <a-&> _
|
||||
'
|
||||
eval -draft -itersel %_
|
||||
# align closer token to its opener when alone on a line
|
||||
try %/ exec -draft <a-h> <a-k> ^\h+[]}]$ <ret> m s \`|.\' <ret> 1<a-&> /
|
||||
_
|
||||
"
|
||||
|
||||
def -hidden _json_indent_on_new_line "
|
||||
|
Loading…
Reference in New Issue
Block a user