practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
110 stars 33 forks source link

Structural editing with Evil #212

Open practicalli-johnny opened 4 years ago

practicalli-johnny commented 4 years ago

Evil normal state to wrap things. First select something with SPC v then s to surround and ] or } to wrap the selection. Using [ or { adds a space between the wrapping characters and the selection.

I used to use clojure-mode for changing parens, eg from a vector to a list with SPC r c and the respective character. I now tend to use cs - Evil change surround. Move the cursor to anywhere on or inside the surrounding parens, c s to change surround, the open paren character I want to replace, eg. [ followed by the parens I want to use instead, eg. )