diff options
author | Franck Cuny <franckcuny@gmail.com> | 2015-12-01 21:03:02 -0800 |
---|---|---|
committer | Franck Cuny <franckcuny@gmail.com> | 2015-12-01 21:03:02 -0800 |
commit | cfc2afbf3c9fc48cf7979db75293f550ed7a886d (patch) | |
tree | c8c580aae1abe96b60ea758818a823f4f2778c60 | |
parent | [emacs] fix docstring for flycheck (diff) | |
download | emacs.d-cfc2afbf3c9fc48cf7979db75293f550ed7a886d.tar.gz |
[emacs] Add bindings for smart-parens.
This binding will help to navigate across expressions.
-rw-r--r-- | emacs.d/inits/50_development.el | 25 |
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 |