summaryrefslogtreecommitdiffstats
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-04-30 20:06:29 +0200
committerGravatar Tom Willemse2013-04-30 20:06:29 +0200
commit3e63768e7b3dbaefb2eb860a0c15e23055510c7b (patch)
tree714d4506346f12ddcd7a3e9b05d5453cdfb4cfee /emacs
parentba09f379556a3aed6d8db31260a2550e6ac979e9 (diff)
downloaddotfiles-3e63768e7b3dbaefb2eb860a0c15e23055510c7b.tar.gz
dotfiles-3e63768e7b3dbaefb2eb860a0c15e23055510c7b.zip
Add some smartparens customization
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.org20
1 files changed, 18 insertions, 2 deletions
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 "<deletechar>") '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