Use indentwidth for lisp, scheme, and Clojure
This commit is contained in:
parent
5c0175d90a
commit
58ab144865
|
@ -179,8 +179,9 @@ define-command -hidden clojure-indent-on-new-line %{
|
||||||
execute-keys -draft '[bl"i<a-Z><gt>"wZ'
|
execute-keys -draft '[bl"i<a-Z><gt>"wZ'
|
||||||
|
|
||||||
try %{
|
try %{
|
||||||
# If a special form, indent another space
|
# If a special form, indent another (indentwidth - 1) spaces
|
||||||
execute-keys -draft '"wze<a-k>\A' %opt{clojure_special_indent_forms} '\z<ret><a-L>s.\K.*<ret><a-;>;"i<a-Z><gt>'
|
execute-keys -draft '"wze<a-k>\A' %opt{clojure_special_indent_forms} '\z<ret>'
|
||||||
|
execute-keys -draft '"wze<a-L>s.{' %sh{printf $(( kak_opt_indentwidth - 1 ))} '}\K.*<ret><a-;>;"i<a-Z><gt>'
|
||||||
} catch %{
|
} catch %{
|
||||||
# If not special and parameter appears on line 1, indent to parameter
|
# If not special and parameter appears on line 1, indent to parameter
|
||||||
execute-keys -draft '"wze<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
execute-keys -draft '"wze<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
||||||
|
|
|
@ -43,10 +43,14 @@ define-command -hidden lisp-indent-on-new-line %{
|
||||||
try %{
|
try %{
|
||||||
execute-keys -draft '[bl"i<a-Z><gt>"wZ'
|
execute-keys -draft '[bl"i<a-Z><gt>"wZ'
|
||||||
|
|
||||||
try %{ execute-keys -draft '"wz<a-l>s.\K.*<ret><a-;>;"i<a-Z><gt>' }
|
try %{
|
||||||
|
# If a special form, indent another (indentwidth - 1) spaces
|
||||||
# If not "special" form and parameter appears on line 1, indent to parameter
|
execute-keys -draft '"wze<a-k>\A' %opt{lisp_special_indent_forms} '\z<ret>'
|
||||||
execute-keys -draft '"wze<a-K>\A' %opt{lisp_special_indent_forms} '\z<ret>' '<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
execute-keys -draft '"wze<a-L>s.{' %sh{printf $(( kak_opt_indentwidth - 1 ))} '}\K.*<ret><a-;>;"i<a-Z><gt>'
|
||||||
|
} catch %{
|
||||||
|
# If not "special" form and parameter appears on line 1, indent to parameter
|
||||||
|
execute-keys -draft '"wze<a-l>s\h\K[^\s].*<ret><a-;>;"i<a-Z><gt>'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try %{ execute-keys -draft '[rl"i<a-Z><gt>' }
|
try %{ execute-keys -draft '[rl"i<a-Z><gt>' }
|
||||||
try %{ execute-keys -draft '[Bl"i<a-Z><gt>' }
|
try %{ execute-keys -draft '[Bl"i<a-Z><gt>' }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user