From 7267119e529b731cbf2e31500f9e8f0ec1dd03bd Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 18 Aug 2015 01:40:49 -0700 Subject: [PATCH] smartparens-mode --- dotfiles/emacs.d/init.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 5cd658a2..36af79e6 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -174,6 +174,9 @@ (defun imalison:disable-linum-mode () (linum-mode 0)) +(defun imalison:disable-smartparens-mode () + (smartparens-mode 0)) + (defun imalison:insert-uuid () (interactive) (insert (imalison:uuid))) @@ -489,6 +492,17 @@ The current directory is assumed to be the project's root otherwise." (progn (setq paradox-execute-asynchronously t))) +(use-package smartparens + :config + (progn + (require 'smartparens-config) + (smartparens-global-mode 1) + (sp-use-smartparens-bindings) + (bind-key "C-)" 'sp-forward-slurp-sexp smartparens-mode-map) + (bind-key "C-}" 'sp-forward-barf-sexp smartparens-mode-map) + (bind-key "C-(" 'sp-backward-slurp-sexp smartparens-mode-map) + (bind-key "C-{" 'sp-backward-barf-sexp smartparens-mode-map))) + (use-package term :config (progn (add-hook 'term-mode-hook 'imalison:disable-linum-mode))) @@ -1105,6 +1119,7 @@ the same tree node, and the headline of the tree node in the Org-mode file." (setq org-mobile-inbox-for-pull "~/Dropbox/org/flagged.org") (setq org-mobile-directory "~/Dropbox/Apps/MobileOrg") (add-hook 'org-mode-hook 'imalison:disable-linum-mode) + (add-hook 'org-mode-hook 'imalison:disable-smartparens-mode) (add-hook 'org-mode-hook (lambda () (setq org-todo-key-trigger t))) (add-hook 'org-agenda-mode-hook 'imalison:disable-linum-mode)))