summaryrefslogtreecommitdiffstats
path: root/.emacs.d
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-11-07 17:26:23 +0100
committerGravatar Tom Willemse2013-11-07 17:26:23 +0100
commitb8b205e064d46dbd1f7a72b4555d73e8659a6ab5 (patch)
tree3d2756159685cbcc8e34add59260af24a073b25f /.emacs.d
parent4a62144606f358864203aca4901e2b153b32ebf1 (diff)
downloademacs-b8b205e064d46dbd1f7a72b4555d73e8659a6ab5.tar.gz
emacs-b8b205e064d46dbd1f7a72b4555d73e8659a6ab5.zip
Bring back the z key in special-mode
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/init.org19
1 files changed, 18 insertions, 1 deletions
diff --git a/.emacs.d/init.org b/.emacs.d/init.org
index ef4b381..c921e9d 100644
--- a/.emacs.d/init.org
+++ b/.emacs.d/init.org
@@ -277,7 +277,7 @@
:weight 'normal))
#+END_SRC
-* A function to sort python includes
+* A command to sort python includes
At work I use Python. Our project is getting bigger and bigger,
import statements are growing. We use the following style:
@@ -306,3 +306,20 @@
(sort-lines nil (1+ (search-backward "("))
(1- (search-forward ")")))))
#+END_SRC
+
+* Bring back the z!
+
+ One or two versions of Emacs ago it was decided that the ~z~ character
+ was too easy to press accidentally, killing the current buffer if it
+ was based on =special-mode=. I disagree. I don't like the fact that
+ using ~q~ leaves the buffers open, usually I want to kill the buffers
+ when I'm done with them, though not always. So I want back my ~z~!
+
+ I don't, however, want to overwrite the ~z~ key in, say, =magit=, so I
+ define it in the =special-mode-map= so it only gets redefined if modes
+ based on =special-mode= don't rebind it themselves.
+
+ #+BEGIN_SRC emacs-lisp
+ (stante-after simple
+ (define-key special-mode-map "z" #'kill-this-buffer))
+ #+END_SRC