Configure usage of the real-auto-save package

This commit is contained in:
Gergely Polonkai 2018-11-19 09:45:45 +01:00
parent 642979d69d
commit ce1126ab75
2 changed files with 22 additions and 0 deletions

View File

@ -2139,6 +2139,27 @@ pattern to look for). If it is active, it will disable it."
("C-o" . gpolonkai/toggle-loccur)))
#+END_SRC
** More fine-tuned autosaving
:PROPERTIES:
:SOURCE: https://www.reddit.com/r/emacs/comments/9vmljb/what_do_you_have_bound_to_mn_and_mp/e9elldc/
:END:
First, a function that turns off auto-saving for remote files.
#+BEGIN_SRC emacs-lisp
(defun gpolonkai/dont-autosave-remote ()
(unless (file-remote-p (or (buffer-file-name) ""))
(real-auto-save-mode)))
#+END_SRC
Then configure ~real-auto-save-mode~
#+BEGIN_SRC emacs-lisp
(use-package real-auto-save
:hook
(text-mode . gpolonkai/dont-autosave-remote))
#+END_SRC
* Make programming a bit easier
** Electric case

View File

@ -161,6 +161,7 @@
pyvenv
rainbow-delimiters
rainbow-mode
real-auto-save
restclient
restclient-helm
s