ADD save-symbol-at-point function

This was originally supplied by smartparens but I don't need the whole
package for this function.

Other functionality which I used from smartparens is available with
electric-pair-mode .
This commit is contained in:
Laurens Miers 2024-09-12 12:35:11 +02:00
parent 9541cfbf44
commit 7329b044f3

View file

@ -379,3 +379,17 @@ https://github.com/remyferre/comment-dwim-2
(define-key projectile-mode-map (kbd "C-x p") 'projectile-command-map) (define-key projectile-mode-map (kbd "C-x p") 'projectile-command-map)
(projectile-mode +1) (projectile-mode +1)
) )
* Custom
** Save symbol at point
#+BEGIN_SRC emacs-lisp
(defun myrmi/save-symbol-at-point ()
"Make symbol at point the latest kill in the kill ring."
(interactive)
(let ((symbol (thing-at-point 'symbol)))
(when symbol (kill-new symbol))))
(global-set-key (kbd "C-M-w") 'myrmi/save-symbol-at-point)
#+END_SRC