Merge branch 'deindent-closing-braces' into HEAD
This commit is contained in:
commit
1eb34996e1
|
@ -101,9 +101,9 @@ define-command -hidden kak-indent-on-new-line %~
|
||||||
# indent after line ending with %\w*[^\s\w]
|
# indent after line ending with %\w*[^\s\w]
|
||||||
try %{ execute-keys -draft k <a-x> <a-k> \%\w*[^\s\w]$ <ret> j <a-gt> }
|
try %{ execute-keys -draft k <a-x> <a-k> \%\w*[^\s\w]$ <ret> j <a-gt> }
|
||||||
# deindent closing brace when after cursor
|
# 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 -itersel <a-x> <a-k>^\h*([>)}\]])\h*(?:\h#.*)?$<ret> <a-/> <c-r>1 <ret> m <a-S> 1<a-&> _
|
||||||
# deindent closing char(s)
|
# deindent closing char(s)
|
||||||
try %{ execute-keys -draft -itersel <a-x> <a-k>^\h*([^\s\w])\h*$<ret> h <a-?><c-r>1<ret> <a-T>% <a-k>\w*<c-r>1$<ret> <a-S> 1<a-&> }
|
try %{ execute-keys -draft -itersel <a-x> <a-k>^\h*([^\s\w])\h*(?:\h#.*)?$<ret> <a-/><c-r>1<ret> <a-?><c-r>1<ret> <a-T>% <a-k>\w*<c-r>1$<ret> <a-S> 1<a-&> }
|
||||||
=
|
=
|
||||||
~
|
~
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,8 @@ define-command -hidden perl-indent-on-new-line %~
|
||||||
try %{ execute-keys -draft k<a-x> s \h+$ <ret>d }
|
try %{ execute-keys -draft k<a-x> s \h+$ <ret>d }
|
||||||
# align to opening paren of previous line
|
# align to opening paren of previous line
|
||||||
try %{ execute-keys -draft [( <a-k> \A\([^\n]+\n[^\n]*\n?\z <ret> s \A\(\h*.|.\z <ret> '<a-;>' & }
|
try %{ execute-keys -draft [( <a-k> \A\([^\n]+\n[^\n]*\n?\z <ret> s \A\(\h*.|.\z <ret> '<a-;>' & }
|
||||||
# copy // comments prefix
|
# copy # comments prefix
|
||||||
try %{ execute-keys -draft <semicolon><c-s>k<a-x> s ^\h*\K/{2,} <ret> y<c-o>P<esc> }
|
try %{ execute-keys -draft <semicolon><c-s>k<a-x> s ^\h*\K# <ret> y<c-o>P<esc> }
|
||||||
# indent after a switch's case/default statements
|
# indent after a switch's case/default statements
|
||||||
try %[ execute-keys -draft k<a-x> <a-k> ^\h*(case|default).*:$ <ret> j<a-gt> ]
|
try %[ execute-keys -draft k<a-x> <a-k> ^\h*(case|default).*:$ <ret> j<a-gt> ]
|
||||||
# indent after if|else|while|for
|
# indent after if|else|while|for
|
||||||
|
|
Loading…
Reference in New Issue
Block a user