Vim
Vim copied to clipboard
Sneak highlighting up to date (forked from #4718)
Hello,
This PR is a fork of the PR #4718 and is pretty much ready to merge. #4718 was stuck for a little while and I wanted to make sure it did not get abandoned. This PR is now properly rebased and up to date. The various fadeout issues mentioned in the previous PR are also now fixed. The escape key now properly escapes Sneak Label Input mode. When in Sneak Label Mode, the proper action is triggered if the key pressed does not correspond to any label (for example pressing y will trigger the yank action).
@J-Fields any update 👀 Thanks!
It's ok @zhenbangbb . Those things take time. J-Fields is already doing a phenomenal job on VSCodeVim and all of this for free so no need to put even more pressure.
Ok so I just finished refactoring a huge chunk of this PR. I wanted to reuse existing Easymotions functions more and also I kept finding new bugs with the old implementation. That is why a big part of sneak.ts has been rewritten. Hopefully the code is now easier to read and all the bugs are gone.
I believe it is ready to be merged now.
Oh and by the way if anyone wants to try it out I made a temporary fork extension called vscodevim-sneak-fork. It implements sneak label mode and also TreeSitter-like text objects from this PR (#6940 ). The github repo is there. Any comments/bugs are welcome.
Thanks so much for reviving and polishing this, @w-cantin! Sorry I've been so slow to get to your (and everyone else's) PRs - just been occupied with other things lately.
Edit: I forgot to check on my own fork to cancel the run, it is actually already possible to cancel runs. Forget everything that follows.
Hello,
I am not sure if this is the right place to ask, but there probably should be a way to stop the build server when the testing process is hanging. I inadvertently pushed some code that would hang during testing and there was no way for me to cancel the automatic github action. As of right now the testing server has been running for close to an hour unnecessarily. Maybe if there was a way to automatically fail the automatic build process after a certain amount of time it could prevent wasted cpu cycles.
@w-cantin thanks for keeping this PR alive 👍
There seems to be an error if you trie to search with F+"("
Failed to handle key
(
: Invalid regular expression: /(/: Unterminated group
Good eye!
There was a bug when transforming searchString to a regex when the searchString contained special Regex Characters like "(" or "%". It is now fixed and I added some tests to make sure it does not happen again.
Hello @J-Fields,
I was wondering if adding label mode and highlighting to Sneak was still important for VSCodeVim. I am asking because I know it is a feature that many people want as seen by the number of downloads of a temporary fork I made here and also the number of votes on this PR as well as the previous PR #4718.
I understand that you are quite busy and working on merging PRs from random people is probably not enjoyable. I am just trying to make sure the reason the PR has been stuck for a while is not because the code is not up to par. If that is the case I can definitely rework a lot of it as I did not start from scratch and the code might look like Frankeinstein's monster. If the feature is still wanted but the PR is not adequate I would be glad to start again from scratch if it means the feature gets added.
Just let me know and thank you for all the good work you do on VSCodeVim
This PR makes sneak in VSCode-vim much more usable. Thank you, w-cantin for the great contribution!
However, I observed an unexpected behavior with the vscodevim-sneak-fork.vscodevim-sneak-fork
extension, which I suppose is built from w-cantin/Vim: sometimes df
deletes one more character. I would like to open an issue in w-cantin/Vim but couldn't find the Issues tab.
Settings: "vim.sneakReplacesF": true,
How to reproduce: The buffer has text abcd
with the cursor on a
. Then hit dfb
.
Expected: The buffer becomes cd
.
What happened: The buffer becomes d
.
Also tried vscodevim.vim
and didn't find this issue. Disabling vim.sneakReplacesF
also prevents it. Let me know if you need more details.
I don't mean to be "that guy" to chime in on an open PR, but I've been so pumped for this change to land that I can't help myself.
@J-Fields hope that this can be merged soon! This seems to be in a milestone for a version that has long-since been released - I'm wondering if perhaps this review has gotten lost in the shuffle?
Would definitely love this feature