-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
$ command takes newline in visual mode #3970
Comments
A note: this feature works in normal mode. This issue is only with respect to visual mode. |
Just wanted to second that I've seen this issue as well. Same circumstances, same behavior. Environment
|
@J-Fields Seems like your change broke some tests |
@stevenguh You're right, thanks for pointing that out. I'll fix that this afternoon. |
@pattersongp I swear I replicated this in vanilla vim the other day, but now when I try |
This is, apparently, not how vim works (though I thought I tested vim's behavior the other day...) Refs #3970
|
This is vanilla vim: |
That video is already showing You can see the difference if you enter two lines of text. |
Indeed, v$ will select the EOL as well (checked in neovim). The difference is only visual, in vim the cursor doesn't appear in the next line after v$, while in VSCodeVim it does. |
I agree that the EOL is taken into the clipboard, but the cursor should not appear on the following line. Sorry-- the issue should be cursor appears on next line after |
I think that's the limitation of VS Code, but I don't know enough to say for sure. |
Yes, I believe this is not possible in VSCode. Another rendering limitation is that the block cursor is wider when on top of a tab character. |
hey, so this bug still can't be fixed? |
At least, as mentioned, there exists an alternate motion You can rebind (in settings.json) "vim.visualModeKeyBindingsNonRecursive": [
{
"before": ["$"],
"after": ["g", "_"]
},
{
"before": ["g", "_"],
"after": ["$"]
}
] |
Thank you CanonRouge24, your solution solved the aforementioned problem for me. I've been entangled with this problem for over 2 years now, but now thanks to you it's resolved for good. |
But this is modifying a DEFAULT VIM behavior. I wouldn't do that, the only problem is visual, cause it shows the cursor in the second line. But actually that is going to give a better understanding to people who don't know that much about VIM, about how it actually works |
Describe the bug
When in visual mode, using the
$
command should take you to the last character of a line, not including the new line, if present.To Reproduce
Steps to reproduce the behavior:
$
to go to the end of line, but end with the cursor on the next line.Expected behavior
The expected behavior is stopping at the last character, that is not a new line.
Environment
The text was updated successfully, but these errors were encountered: