diff options
author | Case Duckworth | 2021-01-25 16:52:38 -0600 |
---|---|---|
committer | Case Duckworth | 2021-01-25 16:52:38 -0600 |
commit | 1c7485515312bab03e734df95c78ec39293d2c09 (patch) | |
tree | 0505e3ecaaa4e2d12314173bc9f21094539821a8 | |
parent | Add crosswords (diff) | |
download | emacs-1c7485515312bab03e734df95c78ec39293d2c09.tar.gz emacs-1c7485515312bab03e734df95c78ec39293d2c09.zip |
Add scratch package
-rw-r--r-- | config.org | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config.org b/config.org index 101cd75..e72fb15 100644 --- a/config.org +++ b/config.org | |||
@@ -219,6 +219,23 @@ function to the =kill-buffer-query-functions= hook that will return | |||
219 | (add-hook 'kill-buffer-query-functions #'immortal-scratch) | 219 | (add-hook 'kill-buffer-query-functions #'immortal-scratch) |
220 | #+end_src | 220 | #+end_src |
221 | 221 | ||
222 | *** An /even better/ scratch buffer :package: | ||
223 | |||
224 | The aptly-named =scratch= pops open a new scratch buffer /with the same | ||
225 | mode as the file you're currently editing/. I'm pretty chuffed about | ||
226 | it. | ||
227 | |||
228 | I found it from [[https://old.reddit.com/r/emacs/comments/l4v1ux/one_of_the_most_useful_small_lisp_functions_in_my/][this discussion]], which might also come in handy | ||
229 | someday. | ||
230 | |||
231 | #+begin_src emacs-lisp :noweb-ref packages | ||
232 | (straight-use-package 'scratch) | ||
233 | #+end_src | ||
234 | |||
235 | #+begin_src emacs-lisp :noweb-ref bindings | ||
236 | (define-key acdw/leader (kbd "C-x") #'scratch) | ||
237 | #+end_src | ||
238 | |||
222 | *** Kill buffers better | 239 | *** Kill buffers better |
223 | 240 | ||
224 | #+begin_src emacs-lisp :noweb-ref functions | 241 | #+begin_src emacs-lisp :noweb-ref functions |