@jr0cket I’m trying out your spacemacs.d
setup and it’s really great! One thing I can’t seem to figure out: vim motions like {
and }
and [b
etc (Tim Pope’s unimpaired plugin) don’t seem to be working anymore, and have been replaced by some kind of s-exp motions. Is this something custom you’ve configured? I can’t seem to find how to regain the default behavior.
Ah, I found the issue. I had to comment out this line here https://github.com/practicalli/spacemacs.d/blob/2552390bd56445150615f74e22a631914bdd14c7/init.el#L895
The (
and [
keybindings navigate s-exp boundaries in the practicalli configuration.
Do they do something different in the unimpaired plugin?
I dont think plugins can be considered default behaviour across Vim and Emacs
I dont advise switching off evil safe lisp structural editing for lisp / clojure as it increases the risk of breaking the structure of your code.
But my config is for me, feel free to change it how you wish
My muscle memory of using {
and }
to jump between “blocks” is too strong haha. Same with [b
to jump to the previous buffer, etc…
Enabling structural safety also enables cleverparens
, which appears to conflict with evil-unimpaired
.
Noob question: What is the most efficient way to wrap a sexp from (foo bar)
to ((foo bar))
that also works with ]
and }
?
SPC k w
works with only ()
parens
@pablore I use surround from vim normal state, s
followed by the character.
So to surround with {}
SPC v
to select the sexp, s
to surround and }
to surround with {} without spaces
Or, use SPC k w
and then , r c {
to change the sexp to a hash-map
@pablore I do y s a ) }
which also leverages vim surround. Mnemonic is “yes surround around parenthesis with curlies”.