commit 879d0ac7b5606fca6ce9c33c32db33f2032bb910 parent 0701fc77c72f4ba37896b2ff59954c595b14d5f7 Author: Alex Balgavy <alex@balgavy.eu> Date: Thu, 15 Jul 2021 11:02:15 +0200 emacs: set up some missing bindings Diffstat:
M | emacs/config.org | | | 27 | +++++++++++++++++++++++++++ |
1 file changed, 27 insertions(+), 0 deletions(-)
diff --git a/emacs/config.org b/emacs/config.org @@ -458,6 +458,33 @@ Enable semantic mode for major modes: mode-hooks)) #+end_src +** Forward-word and forward-to-word +Change M-f to stop at the start of the word: + +#+begin_src emacs-lisp +(global-set-key (kbd "M-f") 'forward-to-word) +#+end_src + +Bind M-F to the old functionality of M-f (stop at end of word) + +#+begin_src emacs-lisp +(global-set-key (kbd "M-F") 'forward-word) +#+end_src + +** Rectangle insert string +#+begin_src emacs-lisp + (global-set-key (kbd "C-x r I") 'string-insert-rectangle) +#+end_src + +** Org mode - yank URL +#+begin_src emacs-lisp + (defun org-yank-link-url () + (interactive) + (kill-new (org-element-property :raw-link (org-element-context)))) + + (define-key org-mode-map (kbd "C-c M-y") 'org-yank-link-url) +#+end_src + * Misc settings ** Enable all commands By default, Emacs disables some commands.