From 3e63768e7b3dbaefb2eb860a0c15e23055510c7b Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 30 Apr 2013 20:06:29 +0200 Subject: Add some smartparens customization --- emacs/init.org | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'emacs') diff --git a/emacs/init.org b/emacs/init.org index dbe0dfa..619a17b 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1253,7 +1253,7 @@ (setq jabber-roster-show-bindings nil) #+END_SRC -* Defer font locking a little +* Defer font locking a little :fontlock: By deferring font-lock for a very short time it should improve scrolling performance. @@ -1262,7 +1262,7 @@ (setq jit-lock-defer-time 0.2) #+END_SRC -* Turn on compilation-shell-minor-mode for pony buffers +* Turn on compilation-shell-minor-mode for pony buffers :pony: Turn on =compilation-shell-minor-mode= whenever =pony-minor-mode= starts in a =comint-mode= buffer. Since buffers like ~*ponymanage*~ and @@ -1280,6 +1280,22 @@ (add-hook 'comint-mode-hook 'turn-on-compilation-shell-for-pony) #+END_SRC +* Make smartparens a little stricter :smartparens: + + Set the delete and backspace keys to some smartparens keybindings + that should make pair balancing a little stricter. These key + bindings refuse to delete pair delimeters or skip over them if they + still have content. + + #+BEGIN_SRC emacs-lisp + (defun oni:smartparens-set-keys () + (local-set-key (kbd "DEL") 'sp-backward-delete-char) + (local-set-key (kbd "") 'sp-delete-char) + (local-set-key (kbd "C-d") 'sp-delete-char)) + + (add-hook 'smartparens-mode-on-hook 'oni:smartparens-set-keys) + #+END_SRC + * All the rest This still needs to be sorted out and documented, haven't had time -- cgit v1.2.3-54-g00ecf