rc: make insertion hooks more consistent

This commit is contained in:
Johannes Altmanninger 2021-04-17 18:18:43 +02:00
parent 3ab2b98ec3
commit eb3beff959
4 changed files with 4 additions and 3 deletions

View File

@ -97,7 +97,7 @@ evaluate-commands %sh{
define-command -hidden mercury-insert-on-new-line %{ define-command -hidden mercury-insert-on-new-line %{
evaluate-commands -draft -itersel %{ evaluate-commands -draft -itersel %{
# copy '%' comment prefix and following white spaces # copy '%' comment prefix and following white spaces
try %{ execute-keys -draft k <a-x> s ^\h*\%\h* <ret> y jgh P } try %{ execute-keys -draft k <a-x> s ^\h*\%\h* <ret> y gh j P }
} }
} }

View File

@ -149,6 +149,7 @@ define-command -hidden python-insert-on-new-line %{
try %{ execute-keys -draft k <a-x> s ^\h*#\h* <ret> y jgh P } try %{ execute-keys -draft k <a-x> s ^\h*#\h* <ret> y jgh P }
} }
} }
define-command -hidden python-indent-on-new-line %< define-command -hidden python-indent-on-new-line %<
evaluate-commands -draft -itersel %< evaluate-commands -draft -itersel %<
# preserve previous line indent # preserve previous line indent