From 0d4dfbc349f435047123ee23707d1c39a4cafca5 Mon Sep 17 00:00:00 2001 From: John Isom Date: Sat, 1 Aug 2020 11:29:59 -0600 Subject: [PATCH] Implement copying comment char (#) and whitespace after it --- rc/filetype/crystal.kak | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rc/filetype/crystal.kak b/rc/filetype/crystal.kak index 725a2b3d..dbb1168c 100644 --- a/rc/filetype/crystal.kak +++ b/rc/filetype/crystal.kak @@ -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 s '^\h*\K#\h*' y j gl p } + } } define-command -hidden crystal-indent-on-char %{