Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow virtualedit=block #4568

Open
shilch opened this issue Feb 20, 2020 · 4 comments
Open

Allow virtualedit=block #4568

shilch opened this issue Feb 20, 2020 · 4 comments

Comments

@shilch
Copy link

shilch commented Feb 20, 2020

Is your feature request related to a problem? Please describe.
Vim has the virtualedit=block option which allows a block selection to go past the end of a line.

Without virtualedit=block With virtualedit=block

Describe the solution you'd like
There's also issue #1632 which deals with another virtualedit option. They might be solved in the same way.

Describe alternatives you've considered
None

Additional context
Screenshots attached above.

@J-Fields
Copy link
Member

I've marked this as upstream because I think this is much better done in VSCode itself. I don't think we can do a satisfying job ourselves (for instance, making it work with mouse clicks is impossible, and to get a cursor over there, we'd actually have to add that whitespace to the document, since VSCode doesn't actually have virtual space, which would likely cause problems or at least VERY significant complexity).

@jondkinney
Copy link

@J-Fields I've been recently replicating my vim/tmux setup in VSCode and I've been surprisingly happy with it. The driver was to get a better workflow with copilot chat / edit versus what's currently available in the terminal domain. https://aider.chat/ shows some promise, and I forked a vim plugin to allow it to sort of work inside neovim, but it's definitely not as slick of an experience as what VSCode offers. But I digress.

My main question is - one of the things that trips me up on almost all editor movements is that I greatly prefer to have my vim setups use virtualedit=all so that the cursor can go anywhere. This helps me get to where I want to go without any horizontal cursor jumps which often land me not quite where I want to end up.

Just asking your opinion, I guess, is there any hope that VSCode upstream will ever add support for virtual space? Based on your other comment here, it sounds like that'd be a necessary prerequisite to having this feature in the vim plugin?

Thanks for your time! Cheers 👋

@McPhale
Copy link

McPhale commented Feb 3, 2025

@jondkinney there's an open issue and a pull request being worked on upstream:

microsoft/vscode#13960
microsoft/vscode#228680

@jondkinney
Copy link

Oh wow! That seems super promising. Thanks for pointing me towards those issues 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants