1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-18 00:42:13 +03:00

Update comment wording for deindentation

This commit is contained in:
John Isom 2020-07-26 20:46:47 -06:00
parent 0439128007
commit 565e3bef1d
3 changed files with 3 additions and 3 deletions

View File

@ -98,7 +98,7 @@ define-command -hidden c-family-indent-on-newline %< evaluate-commands -draft -i
try %< execute-keys -draft K <a-x> <a-k>\;\h*(//[^\n]+)?$<ret> \ try %< execute-keys -draft K <a-x> <a-k>\;\h*(//[^\n]+)?$<ret> \
K <a-x> s \belse\b\h*(?://[^\n]+)?\n([^\n]*\n){2}\z<ret> \ K <a-x> s \belse\b\h*(?://[^\n]+)?\n([^\n]*\n){2}\z<ret> \
<a-S>1<a-&> > <a-S>1<a-&> >
# deindent closing brace(s) # deindent closing brace(s) when after cursor
try %< execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> > try %< execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> >
# align to the opening parenthesis or opening brace (whichever is first) # align to the opening parenthesis or opening brace (whichever is first)
# on a previous line if its followed by text on the same line # on a previous line if its followed by text on the same line

View File

@ -89,7 +89,7 @@ define-command -hidden go-indent-on-new-line %~
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
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> ] 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) # deindent closing brace(s) when after cursor
try %[ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> ] try %[ execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> ]
= =
~ ~

View File

@ -112,7 +112,7 @@ define-command -hidden rust-indent-on-new-line %~
try %+ execute-keys -draft k <a-x> <a-k> ^\h*where\h*$ <ret> j <a-gt> + try %+ execute-keys -draft k <a-x> <a-k> ^\h*where\h*$ <ret> j <a-gt> +
# dedent after lines starting with . and ending with , or ; # dedent after lines starting with . and ending with , or ;
try %_ execute-keys -draft k <a-x> <a-k> ^\h*\..*[,<semicolon>]\h*$ <ret> j <a-lt> _ try %_ execute-keys -draft k <a-x> <a-k> ^\h*\..*[,<semicolon>]\h*$ <ret> j <a-lt> _
# deindent closing brace(s) # deindent closing brace(s) when after cursor
try %< execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> > try %< execute-keys -draft <a-x> <a-k>^\h*[})]+\h*$<ret> <a-lt> >
# todo dedent additional unmatched parenthesis # todo dedent additional unmatched parenthesis
# try %& execute-keys -draft k <a-x> s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{ # try %& execute-keys -draft k <a-x> s \((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*\) l Gl s\) %sh{