From 1401cf46b09ad3c15159e8715fe35ab9c3784a6c Mon Sep 17 00:00:00 2001 From: Inc0n Date: Sun, 7 Aug 2022 11:09:38 +0100 Subject: [PATCH] Make C-k also copy same region, it would also kill --- vterm.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vterm.el b/vterm.el index 630b50e..08188fb 100644 --- a/vterm.el +++ b/vterm.el @@ -938,6 +938,12 @@ running in the terminal (like Emacs or Nano)." (memq 'shift modifiers) (memq 'meta modifiers) (memq 'control modifiers))))) + +(defun vterm-send-C-k () + "Send `C-k' to the libvterm and copy that region." + (interactive) + (kill-ring-save (point) (vterm-end-of-line)) + (vterm-send-key "k" nil nil :ctrl)) (defun vterm-send-start () "Output from the system is started when the system receives START."