Created
March 21, 2011 11:11
-
-
Save remvee/879305 to your computer and use it in GitHub Desktop.
Paredit for ruby and javascript.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Enable paredit for a couple for non lisp modes; tweak | |
;; paredit-space-for-delimiter-predicates to avoid inserting spaces | |
;; before open parens. | |
(dolist (mode '(ruby espresso)) | |
(add-hook (intern (format "%s-mode-hook" mode)) | |
'(lambda () | |
(add-to-list (make-local-variable 'paredit-space-for-delimiter-predicates) | |
(lambda (_ _) nil)) | |
(enable-paredit-mode)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@johnbendi I had the same question and ended up binding the following function to
{
in theruby-mode-map
Source: https://www.emacswiki.org/emacs/paredit-extension.el