When using Paredit, I often come across the following (pipe char represents the cursor):
(foo |bar baz)
I want to paredit-wrap-around bar in parens, so I use paredit-wrap-around ( M - ( ) to get this:
(foo (|bar) baz)
The same thing happens when I want to put bar inside a string, I can use M - " to get the following:
(foo "|bar" baz)
However, Clojure also uses square brackets [] and curly braces {} for vectors, mappings, and sets. They don't seem to have the paredit 'wrap around' command. Thus, in this case, for example, to put a stroke on a vector, I usually use the [ key to create a new vector:
(foo [|] bar baz)
followed by paredit-forward-slurp-sexp ( C - → ), which results in:
(foo [| bar] baz)
I would like to remove the space character that was inserted before bar . Is it possible? Why does paredit preserve char whitespace when moving from an empty expression to one containing one element? Should the first element added to the S-expression always be propped up right before the opening steam?
source share