summary refs log tree commit diff
path: root/emacs.d/inits/50_development.el
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2015-12-01 21:03:02 -0800
committerFranck Cuny <franckcuny@gmail.com>2015-12-01 21:03:02 -0800
commitcfc2afbf3c9fc48cf7979db75293f550ed7a886d (patch)
treec8c580aae1abe96b60ea758818a823f4f2778c60 /emacs.d/inits/50_development.el
parent[emacs] fix docstring for flycheck (diff)
downloademacs.d-cfc2afbf3c9fc48cf7979db75293f550ed7a886d.tar.gz
[emacs] Add bindings for smart-parens.
This binding will help to navigate across expressions.
Diffstat (limited to '')
-rw-r--r--emacs.d/inits/50_development.el25
1 files changed, 24 insertions, 1 deletions
diff --git a/emacs.d/inits/50_development.el b/emacs.d/inits/50_development.el
index 1e1a243..efab59f 100644
--- a/emacs.d/inits/50_development.el
+++ b/emacs.d/inits/50_development.el
@@ -39,7 +39,30 @@
   :config
   (progn
     (require 'smartparens-config)
-    (smartparens-global-mode 1)))
+    (smartparens-global-mode 1)
+    (setq sp-show-pair-delay 0)
+    (setq sp-autoinsert-if-followed-by-word nil)
+    (show-smartparens-global-mode t)
+    (bind-keys :map sp-keymap
+               ("C-M-d" . sp-down-sexp)
+               ("C-M-a" . sp-backward-down-sexp)
+               ("C-S-a" . sp-beginning-of-sexp)
+               ("C-S-e" . sp-end-of-sexp)
+               ("C-M-f" . sp-forward-sexp)
+               ("C-M-b" . sp-backward-sexp)
+               ("C-M-u" . sp-backward-up-sexp)
+               ("C-M-t" . sp-transpose-sexp)
+               ("C-M-n" . sp-next-sexp)
+               ("C-M-p" . sp-previous-sexp)
+               ("C-M-k" . sp-kill-sexp)
+               ("C-M-w" . sp-copy-sexp)
+               ("M-<delete>" . sp-unwrap-sexp)
+               ("M-<backspace>". sp-backward-unwrap-sexp)
+               ("M-<right>" . sp-forward-slurp-sexp)
+               ("M-<left>" . sp-forward-barf-sexp)
+               ("M-S-<left>" . sp-backward-slurp-sexp)
+               ("M-S-<right>" . sp-backward-barf-sexp)
+               ("M-d" . sp-splice-sexp))))
 
 (use-package gist
   :ensure t