This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Hi! Right now I'm using vim for editing clojure code and I find myself having a problem with copying chunks code because of tha parens and I end up writing everything by hand again. How do you copy something to the end of an s-exp, where there are additional N closing parens of the main form? If I were to do line-wise copying, I would end up trying to match closing parens all the time
@davs are you using vim-sexp
? It gives you yaf
(yank all form) yif
(yank inner form) etc.
btw do you have (or know of) a vim mapping, that moves 1 char forward or backward (to the closest one) the char being '(', '[', '{' ? So I could step inside forms, map, vector and list declarations
I know how to do it for one of the chars, but it would be great if there were an universal mapping, that would jump to the closest of any of those chars
From the vim-sexp
readme:
> The ( and ) motions move the cursor to the nearest paired structural bracket.
yes, vim-sexp ( ) works kinda that way, but it moves only to the outer bracketes. so for example if I have code: (+ (+1 2) (+ 3 4)) and I'm inside the (+ 3 4+ form, then it jumps over the (+ 1 2) form. I guess I'll check it's source code.
any Cursive users played around with LivePlugin? https://github.com/dkandalov/live-plugin