From cfc2afbf3c9fc48cf7979db75293f550ed7a886d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 1 Dec 2015 21:03:02 -0800 Subject: [emacs] Add bindings for smart-parens. This binding will help to navigate across expressions. --- emacs.d/inits/50_development.el | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) 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-" . sp-unwrap-sexp) + ("M-". sp-backward-unwrap-sexp) + ("M-" . sp-forward-slurp-sexp) + ("M-" . sp-forward-barf-sexp) + ("M-S-" . sp-backward-slurp-sexp) + ("M-S-" . sp-backward-barf-sexp) + ("M-d" . sp-splice-sexp)))) (use-package gist :ensure t -- cgit 1.4.1