Is there a way to expand / contract current selection by the levels with vim-sexp? So if I do "vi(", the innermost form surrounded by () is selected, is there a way to expand the selection to the next one form containing that one?
Also, is there a way to preserve the parenthesis on deleting? So if I delete the second line in
(defn f []
2)
the output will be (defn f [])
?vim-sexp is compatible with parinfer and provides that functionality. i have both vim-sexp and parinfer installed and they make a great team 🙂
Great, I am trying it out!
i haven't really used vim-sexp but i get the latter effect from kovisoft/paredit
I think vim-sexp is primarily oriented to using text objects (eg. f for form, F for top level form, which combine with d/y and then i/a etc.)
vibibibib...
Cool! Is there a way to contract after that?
Great, thank you!
Is anyone using vim-cljfmt
? When I try to format the file, it deletes the its content...
dunno if you already worked around this, but if you don’t, here is a clue https://github.com/venantius/vim-cljfmt/issues/48
venantius/vim-cljfmt
? i use it in some projects and haven't had that problem
Yes.