Implement copying comment char (#) and whitespace after it

This commit is contained in:
John Isom 2020-08-01 11:29:59 -06:00
parent 8f0843978e
commit 0d4dfbc349

View File

@ -198,6 +198,10 @@ define-command -hidden crystal-indent-on-new-line %{
}
define-command -hidden crystal-insert-on-new-line %{
evaluate-commands -no-hooks -draft -itersel %{
# Copy comment prefix and following whitespaces
try %{ execute-keys -draft k <a-x> s '^\h*\K#\h*' <ret> y j gl p }
}
}
define-command -hidden crystal-indent-on-char %{