Very early days (and not as innovative as a lot of...
# share-your-work
z
Very early days (and not as innovative as a lot of the things I see on here), but I started working on a vscode extension that takes some ideas from semantic editing to build something sort of vimlike but that has things like functions, parameters, etc as first class ideas so you can e.g. press f to select the nearest function, press q to go to parameters, and then press a to append a new parameter at the end (which adds a comma and space, or newline and space, or whatever, and then drops you in insert mode) Here's a little video if you're interested -

https://youtu.be/owuuFxDBQh4

🍰 1
💓 3
k
Ooh so cool! I can't believe I haven't thought to want this before. I wonder how many such polyglot concepts there are like statement, function, argument. Argument in particular is a powerful one that many tools don't do much with. Idea: include a couple of paredit like hotkeys for broadening or narrowing the selection. For example, wanting to append to the lhs and then rhs of a parallel assignment statement.
z
That's a good idea! I have a way to go up and down on the tree, (e.g. go from one parameter to all of them) but I don't have something for extending to include siblings but it would be easy to add
My thinking was that there are a relatively small number of concepts that people care about in most languages, and c like languages are similar enough that you can get 95% of what you want across all those languages pretty easily. The demo is typescript but I've done some testing with go and rust and it mostly works
❤️ 1
d
This is really cool. Did you follow any tutorial on how to create a vscode extension?
z
@Daniel Garcia thanks! No, I had a little experience in the past contributing to https://github.com/nicoespeon/abracadabra and I also used https://github.com/Gregoor/soy as a jumping off point which helped
Although I tend to just jump into things and google when I don't know how to solve a particular problem
d
Thanks for the links, they look like a great starting point for me to learn about vscode extensions