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
expand-region.

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 "(")
'self-insert-command)

How can I properly configure this?
_______________________________________________
implementations-list mailing list
[email protected]
https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list

Reply via email to