Whenever I start emacs, there are a few things I do right away:
M-x slime
M-x ido-mode
I also open a few files that I always use so they are available as buffers:
C-x C-f ....
When I get into a buffer, I then do this for that buffer (nearly all buffers):
M-x visual-line-mode
If it is a Lisp buffer, I also always do this as well:
M-x paredit-mode
M-x rainbow-delimiters-mode
M-x show-paren-mode
Is there a way for emacs to automatically do all of these things when I start emacs and when I load buffers?
(add-hook 'emacs-startup-hook
(lambda ()
(kill-buffer "*scratch*")
(find-file "~/todo.org")
(ido-mode t)
))
;; Emacs Lisp
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(slime-mode t)
(visual-line-mode 1)
(paredit-mode 1)
(rainbow-delimiters-mode 1)
(show-paren-mode 1)
))
;; Common Lisp
(add-hook 'lisp-mode-hook
(lambda ()
(slime-mode t)
(visual-line-mode 1)
(paredit-mode 1)
(rainbow-delimiters-mode 1)
(show-paren-mode 1)
))
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