-
-
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
Conflict with VSCode Ctrl + D key #2144
Comments
Have been fighting this recently too; just discovered the problem goes away when I disable VSCodeVim, but I use it so much I don't want to do that. |
I did just find, reading the documentation, that if you're in normal or visual mode and hit However, there is an irritating thing: After a few selections are added, the screen's scroll position stays the same, it just flashes as selections are added, so you can't actually see each selection that's added as you can without VSCode Vim enabled. |
Thanks, it worked in normal mode. |
The reason for this is that we don't support any semblance of "selections" in insert mode. The scroll position thing is something that should be fixable. I'll try to take a look sometime. |
I think #2269 resolves this issue? If not, feel free to re-open. |
If it's undefined. So if you don't have a |
@jpoon you just saved me from struggling ;-) |
For future dudes:
and not |
Ok, seems like this is resolved. |
How do I undefine handleKeys to get the default VS Code behavior? I've tried a number of options, including…
…and…
…but ⌘-D still flickers like mad as the selection grows, and the page fails to scroll as expected. I also tried unmapping ⌘-D in Keyboard Shortcuts, but that just made things worse! At this point, the only thing I can find as a workaround is adding a keyboard shortcut to "Vim: Toggle Vim Mode" so I can temporarily get VS Code's default behavior quickly when I need it. Hopefully I'm just missing something "obvious"…would love to not need the above workaround! :) |
I think this issue should be reopened! When I select "foo-bar" in the following code snippet and press Ctrl-D, the next "foo-bar" is not selected. Instead, the next "bar" or the next "foo" is selected, depending on which word the cursor currently stands.
This is my config:
|
In VIM mode to select all matches use cmd+shift+L shortcut.
|
@andrewLucky1 I tried it but it didn't work for me. What I have done is disable the multicursor keyboard shortcut for vim, the problem is that select the whole word doesn't work for all the selected instances using Shit + Alt + ← or Shit + Alt + →.
Anyone have figured out how to solve it? |
This seems to have broken rebinding of |
Try to use the trick instead before resolved:
|
I confirm this is still a bug : the EDIT : actually it also does something in Normal mode, the behavior of Ctrl + D is different when the extension is enabled. |
I have the same problem.
and
and
I'm on macOS. Nothing seems to work. The only working solution, for me, is disabling vim mode. |
It might because of unexpected key binds. Try to press |
Excuse me, what does |
Thanks a lot. this helped me to solve the problem on mac 🙏 is it possible to select one by one not all of the at once? |
@frarees @paulina-grunwald
In my configuration, I just specified some shortcuts which should be handled by VSCode. By the way, I find |
Darn, none of these things are working for me. @andrewLucky1 Tried this solution, but after selecting something and pressing ctrl+d it will deselect that thing and select a few of the other similar things.. but even that is not reliable sometimes it just deselects everything, sometimes it just picks something with that string within it and then starts selecting between all of those things and nothing... and the other solutions using I've tried adding these and all the in betweens...
and
I was really excited to use vim and level up my coding but vs code's multi-select is something I can't imagine losing! @jpoon please this SHOULD DEFINITELY BE REOPENED thanks! |
In fact, both work for me(mine needs to add one line as below)...I'm not sure why your vs code can't do it.
I found that "vim.useCtrlKeys": false has some issues. Some works, such as Ctrl-a, Ctrl-n, but Ctrl-d still works in VIM mode. Again, just set "vim.useCtrlKeys": true for Ctrl-F/B |
[UPDATE: Fwiw, I was never able to properly get the hang of the workflow I've enumerated here. The best workaround for me so far is @commanderfun's from Jan 16.] Thanks for your For anyone not wanting to experiment with
|
Bless you. Using |
I think this issue should be reopen! I confirm none of the solutions presented here worked with my up-to-date VSCode / Ubuntu 19.10 env. There is a nice plugin that inserts mutiple-cursors functionality in Vim: https://github.com/terryma/vim-multiple-cursors. But I think it's easier just to solve the insert-mode |
This is still now working with latest vscode and vim plugin. I think the issue should be reopen. |
Here's a workaround I came up with. It's not ideal but saved me from giving up on this plugin. Add this to keybindings.json to quickly enable/disable VIM. When you need to use
|
Thanks guys!! |
Does anyone know why "ctrl+pageDown/pageUp" doesn't work when vim is in insert mode? How do you switch between opened tabs? |
I usually use Although it’s flagged as experimental, I've never had a problem with it |
@andrewLucky1 Do you have more insight on this shortcut, is it a VS code shortcut, does it have a meaning in Vim? It seems to do exactly what
In most case, I want to select all values, basically doing a research and replace but more intuitively with multiple cursors. |
Why this issue is closed? It's not fixed yet. common I like this plugin and I don't want to give up on it! |
@eric-burel @amirmeimari you can disable the ctrl+d key in vim "vim.handleKeys": {
"<C-d>": false,
}, putting this in your vscode settings should work |
No, |
I had always thought cmd+d multi select behavior in VScode was just weird and not as good as Sublime's. Then I tried disabling this plugin and it works perfectly. This should definitely be re-opened. I can confirm that the handleKeys config option does not seem to work. |
however, it's a workaround, it works like a charm |
Since I still want to use Ctrl+d in normal mode for scrolling I've added a visual mode keybinding that just calls the standard VS Code command:
This seems to be working fine for me so far. |
I think there was a lot of confusion here between differences of the Ctrl modifier key between Windows users and macOS users. For what it's worth, after pressing "Ctrl+d" on macOS with the Vim extension, I had to select an environment and then I was able to page down as if it was using Vim bindings. |
Where is that environment setting? |
I saw some guy coding in vim mode like a pro. I feel I can do that too. So I installed this plugin but was stuck on this problem. After struggling for some days, I have to uninstall this plugin, cause I use |
This worked for me. It selected multiple words with the same name. It puts you in -visual- mode. I then pressed |
I was trying a lot of solutions, and inspired by @majutsushi answer, I came up with this setup:
I encourage you to play with it. There are a lot of possibilities. I usually use it as follows:
Alternatively:
It is not necessary to add key binding to Normal mode, but I found it very useful. |
Tks for sharing. Just to know there are some brackets errors on snippet. 😉 |
does not work it still do the copy pasting of code, an not vim's page down |
The VSCodeVim team prioritizes issues based on reaction count.
BUG REPORT:
Environment:
What happened:
Unable to find substring with Ctrl+D, it moved cursor to end of selected string when pressed ctrl+D
When VSCodeVim is enabled:
What did you expect to happen:
When VSCodeVim is disabled:
This is my VSCodeVim setting
The text was updated successfully, but these errors were encountered: