about summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2017-07-30T01·50-0400
committerWilliam Carroll <wpcarro@gmail.com>2017-07-30T01·50-0400
commitee62bf583698b15617f1cff2e33528c5b94b4b55 (patch)
tree32ffbf47fb11fd2f711b3fa631761782f08e1db8 /configs
parente6eda451b5eb9d36187892c53b82c733908674fc (diff)
Ensures :w writes buffer even if there is nothing to save
Diffstat (limited to 'configs')
-rw-r--r--configs/shared/.emacs6
1 files changed, 5 insertions, 1 deletions
diff --git a/configs/shared/.emacs b/configs/shared/.emacs
index b8104f2a379a..11a4aeaf18d7 100644
--- a/configs/shared/.emacs
+++ b/configs/shared/.emacs
@@ -424,13 +424,17 @@
   (global-evil-surround-mode t)
   (global-evil-leader-mode t)
   :config
+
+  (defadvice evil-write (around force-evil-write activate)
+    (set-buffer-modified-p t)
+    (save-buffer))
+
   (setq evil-emacs-state-cursor '("VioletRed3" box))
   (setq evil-normal-state-cursor '("DeepSkyBlue2" box))
   (setq evil-visual-state-cursor '("orange" box))
   (setq evil-insert-state-cursor '("VioletRed3" bar))
   (setq evil-replace-state-cursor '("VioletRed3" bar))
   (setq evil-operator-state-cursor '("VioletRed3" hollow))
-  (evil-ex-define-cmd (kbd "w") 'save-buffer-always)
   (evil-ex-define-cmd (kbd "qb") 'kill-this-buffer)
 
   ;; center search results