Hi everyone. I'm trying VSCode and Calva out and I've noticed that ctrl+left
and ctrl+right
seems to apply a burp/slurp type functionality on the code instead of traversing the text by jumping left / right over each word. Does anyone here know what the keybindings for skipping over words is or what package might be causing the burp/slurp binding to be overridden?
That would be the Calva package. 😎 Default bindings for moving a form at a time is alt+ctrl+left/right
. And moving words in a non-structural sense, I think the vscode built-in is alt+left/right
, and should work.
Ah, I see how alt+ctrl+left/right
works now. I was at a closing paren and it wasn't going any further, but being outside of that paren moved me across entire forms at the next level 👍
Thanks @pez
Going to take a little getting used to 😂 I can see myself accidentally slurping/barfing code without realising
i'm looking for something like emacs' dabbrev-expand (M-/) -- i came across: https://marketplace.visualstudio.com/items?itemName=rkwan94.vscode-emacs-improved that mentions dabbrev-expand but that particular extension doesn't appear to provide an implementation. any ideas, tips, etc?
@yogidevbear there are commands to move you in and out of parens, and much more. Check the Paredit guide out: https://calva.readthedocs.io/en/latest/paredit.html
If the keybindings feel too awkward after a while, you can just change them.
@sogaiu , What is dabbrev?
@pez dabbrev-expand is a way to perform completion using "things" from your open buffers / editor windows.
so if you've already typed something and that's in an open editor window, it becomes a candidate for completion
I see. Does vscode default only use the current editor window?
i'm not sure -- i think "Trigger Suggest" (control-space in linux?) does show me some things i've already got in the same editor window
in testing now, it seems something in a separate editor pane isn't picked up.
that same thing is actually picked up within the same editor pane -- but i guess it doesn't necessarily "tokenize" appropriately.
Word separators and stuff is configurable.
yes, you provided good assistance on that recently 🙂
At least for double clicking. Oh, i did? Haha
yes -- it was in the context of double-clicking that things worked out
it would be nice if the namespace stuff could be made to work with the completion
this is all in vanilla vscode fwiw
It was Clojure scoping, right?
Yeah, i have figured that out. 😎
i modified settings.json to have a bit for clojure, if that's what you mean
Yeah
"[clojure]": {
"editor.wordSeparators": "\t ()\"':,;~@#$%^&{}[]`"
}
There is also a setting for word characters, i think. Don't know if that's relevant.
thanks for the tip -- i'll try to see if that helps