vscode

Quiet in here? Check #calva-dev out :smiley:
yogidevbear 2020-01-15T16:07:15.004600Z

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?

pez 2020-01-15T16:22:23.008400Z

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.

yogidevbear 2020-01-15T17:11:13.009900Z

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 👍

yogidevbear 2020-01-15T17:11:41.010300Z

Thanks @pez

yogidevbear 2020-01-15T17:12:34.011200Z

Going to take a little getting used to 😂 I can see myself accidentally slurping/barfing code without realising

2020-01-15T18:13:21.012700Z

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?

pez 2020-01-15T20:38:09.014600Z

@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

👍 1
pez 2020-01-15T20:38:54.016Z

If the keybindings feel too awkward after a while, you can just change them.

pez 2020-01-15T20:40:27.016800Z

@sogaiu , What is dabbrev?

2020-01-15T20:41:15.017600Z

@pez dabbrev-expand is a way to perform completion using "things" from your open buffers / editor windows.

2020-01-15T20:41:59.018300Z

so if you've already typed something and that's in an open editor window, it becomes a candidate for completion

pez 2020-01-15T20:42:39.019300Z

I see. Does vscode default only use the current editor window?

2020-01-15T20:44:25.020600Z

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

2020-01-15T20:46:26.021300Z

in testing now, it seems something in a separate editor pane isn't picked up.

2020-01-15T20:46:57.022Z

that same thing is actually picked up within the same editor pane -- but i guess it doesn't necessarily "tokenize" appropriately.

pez 2020-01-15T20:49:03.022900Z

Word separators and stuff is configurable.

2020-01-15T20:49:22.023600Z

yes, you provided good assistance on that recently 🙂

pez 2020-01-15T20:49:44.024300Z

At least for double clicking. Oh, i did? Haha

2020-01-15T20:50:05.024800Z

yes -- it was in the context of double-clicking that things worked out

2020-01-15T20:50:23.025300Z

it would be nice if the namespace stuff could be made to work with the completion

2020-01-15T20:50:44.026100Z

this is all in vanilla vscode fwiw

pez 2020-01-15T20:50:58.026400Z

It was Clojure scoping, right?

pez 2020-01-15T20:51:15.027100Z

Yeah, i have figured that out. 😎

2020-01-15T20:51:26.027300Z

i modified settings.json to have a bit for clojure, if that's what you mean

pez 2020-01-15T20:51:39.027500Z

Yeah

2020-01-15T20:51:47.027700Z

"[clojure]": {
      "editor.wordSeparators": "\t ()\"':,;~@#$%^&{}[]`"
    }

pez 2020-01-15T20:52:26.028500Z

There is also a setting for word characters, i think. Don't know if that's relevant.

2020-01-15T20:52:52.029Z

thanks for the tip -- i'll try to see if that helps