Fork me on GitHub
#calva
<
2023-01-10
>
dangercoder15:01:25

When using the vim extension with calva I have to tap the navigation keys, does anyone know how I can fix that?

pez17:01:33

What does it mean to tap the navigation keys?

jakebasile17:01:57

Probably HJKL, and so on. Without proper setup on macOS you have to lift and press the keys over and over to keep moving. In normal vim usage you can just press and hold a movement key to keep moving.

ryfow22:01:00

I thought I'd try out Calva with the vim extension today. It's pretty good, but one issue I noticed is that the delete/backspace key doesn't work when you're searching a file. If I start searching by typing / and then mistype something, the backspace/delete key edits the file rather than the search string.

ryfow22:01:02

Seems to be ok in Cave Man mode.

ryfow23:01:03

I think adding this to the backspace keybinding's when rule makes things work for me personally. I'm not sure what you'd do in the extension to fix it. && vim.mode == 'Insert'

skylize23:01:29

The docs have a page for Vim. Care to submit a PR that explains your findings?

skylize23:01:37

I think Vim extensions are too different from normal VS Code behavior to reasonably expect much in the way of official support from Calva. Much of Calva's functionally is exposed as an API to other extensions. It would be awesome if someone committed to making a Vim-Calva extension that used that to bridge the two worlds.

bringe02:01:34

That’s interesting ^

pez06:01:43

@U09A987EV please file an issue about that problem.

pez17:01:05

Unfortunately the Calva extension API is covering only a tiny sliver of Calva so I doubt anyone can use it to create a VIM-friendly version. OTOH, it seems to work pretty ok from what I hear from users. OTOH2 I hadn't heard f this search prompt problem before... Maybe people just add that to their when clause and feel done with it. I would pull a PR fixing the when clause in Calva's default binding, btw.

skylize18:01:45

If nothing else, a Vim-specific extension provides installable defaults that can be maintained by someone who actually uses Vim mode. Beyond that, supporting an extension maintainer (again, who actually uses Vim mode), by exposing whatever they need exposed in the API, is way more realistic than trying to guess at what might give that select group of users a pleasant and coherent experience.

skylize18:01:45

Similar to how the Nrepl team "supports" Calva users, but is not generally expected to deal with VS Code specific issues directly.

pez19:01:37

Yes it makes sense. There is a Calva team for the nrepl team to support, though. There are a lot of abandoned extensions, and that can cause more troubles for users. I wonder if an extension can provide defaults for other extensions? Then it might be worth it that we release a VIM Calva with mostly that and maintain it in the team.

skylize03:01:35

Actually, that sounds promising. A good set of default keybindings would be a useful enough feature-set for initial release. The first-draft can be as simple as writing directly to keybindings.json, instead of worrying about cross-talk between extensions. Then move over any existing tweaks that are only there to support Vim, (such as the proposed fix for the OP of this thread). That would provide a place to focus on potential Vim mode features, without undue interference with the base project. Might even be inspiration enough to draw in a dedicated maintainer, with a real interest in building useful features. 🤞 If not, at least Calva has control, to ensure maintenance continuity if it proves useful, or to swallow/deprecate it otherwise. Worst case, I think it gives as opportunity to experiment on what features Calva needs to provide for exposing an API to be useful for other extensions.