Skip to content

Instantly share code, notes, and snippets.

@michaelmrose
Created March 27, 2020 20:29
Show Gist options
  • Save michaelmrose/87e9b84c29ccb769477a5dcbf504530c to your computer and use it in GitHub Desktop.
Save michaelmrose/87e9b84c29ccb769477a5dcbf504530c to your computer and use it in GitHub Desktop.
improved set-insert
(defun michael-set-fucking-insert ()
(interactive)
(let ((mm major-mode))
(with-current-buffer
(find-file-noselect "~/.emacs.d/michael/fuckinginsert.el")
(let ((sexp `(evil-set-initial-state ',mm 'insert)))
(eval sexp)
(goto-char (point-max))
(insert (format "%S\n" sexp))
(save-buffer)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment