From b8b205e064d46dbd1f7a72b4555d73e8659a6ab5 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 7 Nov 2013 17:26:23 +0100 Subject: Bring back the z key in special-mode --- .emacs.d/init.org | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to '.emacs.d') 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 -- cgit v1.2.3-54-g00ecf