In Doom Emacs and org-mode, I want to use
org-insert-link pressing the minimum amount of keys.
So I want to combine two-four commands in one.
The default behaviour doesn't leave space before or after.
I have tried various variations of the following but it doesn't work:
(add-hook 'org-mode 'org-insert-link-with-space) (defun org-insert-link-with-space () "org-insert-link-with-space, like org-insert-link but after prompt" (interactive) (insert " ") (org-insert-link) (insert " ") (evil-insert-state) ) (map! :ne "SPC m l" #'org-insert-link-with-space)
I want to type this:
here is a link for you
pressing the minimum amount of keys:
hereSpaceisSpaceaEscSpacemll<copy/paste link and description description>RetforSpaceyou
How do I fix my snippet?
(add-hook 'post-self-insert-hook (lambda () (and (eq last-command-event ?k) (looking-back "jk" (- (point) 2)) (if (> 1 2) (message "True") (call-interactively 'evil-delete-backward-char) (call-interactively 'evil-delete-backward-char) (call-interactively 'org-insert-link) ))))