Create the beginning-of-next-word function with a keybinding

This commit is contained in:
Gergely Polonkai 2023-01-22 07:48:07 +01:00
parent 37fca606a9
commit ac68b3d460
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4

View File

@ -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 dont 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)