Update deindentation rule for awk.kak, cabal.kak, go.kak
This commit is contained in:
parent
428232d2fa
commit
1951f19fd8
|
@ -77,7 +77,7 @@ define-command -hidden awk-indent-on-new-line %[
|
|||
# indent after line ending in opening curly brace
|
||||
try %[ execute-keys -draft k<a-x> <a-k>\{\h*(#.*)?$<ret> j<a-gt> ]
|
||||
# deindent closing brace when after cursor
|
||||
try %[ execute-keys -draft <a-x> <a-k>^\h*\}\h*(?:#.*)?$<ret> hm <a-S> 1<a-&> ]
|
||||
try %[ execute-keys -draft <a-x> <a-k> ^\h*\} <ret> gh / \} <ret> m <a-S> 1<a-&> ]
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ define-command -hidden cabal-indent-on-new-line %[
|
|||
# indent after lines ending with { or :
|
||||
try %[ execute-keys -draft <space> k <a-x> <a-k> [:{]$ <ret> j <a-gt> ]
|
||||
# deindent closing brace when after cursor
|
||||
try %[ execute-keys -draft <a-x> <a-k> \h*\} <ret> / \} <ret> m <a-S> 1<a-&> ]
|
||||
try %[ execute-keys -draft <a-x> <a-k> \h*\} <ret> gh / \} <ret> m <a-S> 1<a-&> ]
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ define-command -hidden go-indent-on-new-line %~
|
|||
# indent after if|else|while|for
|
||||
try %[ execute-keys -draft <semicolon><a-F>)MB <a-k> \A(if|else|while|for)\h*\(.*\)\h*\n\h*\n?\z <ret> s \A|.\z <ret> 1<a-&>1<a-space><a-gt> ]
|
||||
# deindent closing brace(s) when after cursor
|
||||
try %[ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> hm <a-S> 1<a-&> ]
|
||||
try %[ execute-keys -draft <a-x> <a-k> ^\h*[})] <ret> gh / [})] <ret> m <a-S> 1<a-&> ]
|
||||
=
|
||||
~
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user