Getting smartparens wrapping to work in evil-visual-state
ivan.brennan at gmail.com
Sun Nov 27 14:27:45 CET 2016
I've been migrating from Vim to Emacs in evil mode, and I'd like to use
smartparens. I know there's a port of surround.vim, but I've always found
surround.vim awkward to use, so I'd like to explore an alternative approach.
I particularly like smartparens' take on wrapping -- select a region and
type "(" to wrap it in parens. This seems especially nice in concert with
But in evil-visual-state, "(" is bound to evil-backward-sentence-begin. The
binding originates in evil-motion-state-map, which both normal and visual
states inherit from. I've tried a few ways to rebind "(" to
self-insert-command in order to let smartparens do its thing, but so far
nothing I've tried has worked:
(define-key evil-visual-state-map (kbd "(") 'self-insert-command)
(define-key evil-motion-state-map (kbd "(") 'self-insert-command)
(define-key evil-motion-state-map (kbd "(") nil)
(evil-define-key 'visual evil-visual-state-map (kbd "(")
How can I properly configure this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the implementations-list