diff options
Diffstat (limited to '.emacs.d/init.org')
-rw-r--r-- | .emacs.d/init.org | 19 |
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 |