From ac68b3d4609f29cc87f7fbfe3f858624ea302ffa Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 22 Jan 2023 07:48:07 +0100 Subject: [PATCH] Create the beginning-of-next-word function with a keybinding --- configuration.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configuration.org b/configuration.org index 9cc8af8..6ec0506 100644 --- a/configuration.org +++ b/configuration.org @@ -543,6 +543,20 @@ line first. Then jump to the actual end of the line." (backward-char)))) #+end_src +*** Move to the beginning of the next word + +#+begin_src emacs-lisp +(defun gpolonkai/beginning-of-next-word () + (interactive) + (let ((current-point (point))) + (forward-word 1) + (backward-word 1) + + (when (<= (point) current-point) + (forward-word 2) + (backward-word 1)))) +#+end_src + ** File manipulation *** Rename the current file @@ -3774,6 +3788,7 @@ With the new Transient package it will be easier. I just don’t know how to us ("C-~" . toggle-char-case) ("C-z" . nil) ("M-g SPC" . goto-next-char) + ("M-F" . gpolonkai/beginning-of-next-word) :map ctl-x-map ("C-y" . gpolonkai/duplicate-line) ("_" . maximize-window)