copy to end of line from current point

As an Emacs user, maybe you already known CopyWithoutSelection

But currently without copy to line end from current point.
Following is the my implementation, and bind to the shortcut "C-c e"


(defun copy-to-line-end (&optional arg)
  "Save point to current line end into Kill-Ring without mark (or kill and yank)"
  (interactive "P")
  (let ((start (point)))
      (copy-region-as-kill start (point))
(global-set-key (kbd "C-c e") 'copy-to-line-end)

No comments:

Post a Comment