I am a new user of emacs.
I found some useful options that allows me to insert new line before or after cursor: C-j (before cursor), C-o (after cursor).
I found this very convenient in doing formatting text across lines.
Now, are there methods to insert space after cursor for in-line formatting?
Currently I have to insert space before cursor using Space then C-b multiple times just to return to the original position when doing formatting within one line.
I don't think there is such a function, but it is easy to write:
(defun my-insert-space-after-point ()
(interactive)
(save-excursion (insert " ")))
(global-set-key (kbd "C-.") 'my-insert-space-after-point)
This binds the function to C-.; adjust to preference.
Another way to do this is to record a macro, save it, and bind it to a key. The steps to do that are described in this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With