-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Vim Style Key binding #3600
Comments
ping @jasonyueyang |
Looking at this extension, there seems to be some solid work done and a good community around it. Commits going through today and a roadmap of work to be done. |
The ones that exist are pretty poor at this point, not even usable. I use VIM and in Visual Studio VsVim, and I can't even use the extensions that exist for VsCode. |
@kellyelton have you opened bugs on their extension? They seem to be pretty responsive and have closed a number of issues. |
There are some severe limitations with that extension's implementation that make it difficult to operate. I have been fumbling around without Vim bindings to avoid the quirks for now, but I won't be able to stay with VSCode for long this way. As I recall, auto-closing of brackets, auto-complete, and snippet completion (including emmet), all fail in some way. Also, some essential motions are missing. I'll try to get around to actually producing a complete list if someone else doesn't get to it first. For reference, Atom's current Vim plugin is spot on. |
I've used that one and this and sadly they are not even close to completion, some mention issues with whats available in the API in regards to keybindings. I use VsVim daily and its not even close. Another issue IMO is there are at least 3 implementations, would be much better if it becomes one so everyone can work together. Maybe you guys can make this happen. |
Well I don't even use VsCode, this one is kind of a blocker for me. Also, it's just not far enough along to address any work that I currently do either. So no, I haven't opened any tickets, I figured I'd just throw in my two cents that what exists is not even good enough to install. This is actually an issue for lots of editors I've tried recently. The only good vim experience outside of vim is VsVim. |
@NickClark that list would be excellent. @Beatusvir good suggestion and I hope to help this happen. |
And in case you were not already aware 😬 , this is a critical issue for adoption. I'm the only one at my company that uses it right now, others opt for Atom based purely on the Vim support. |
I don't use VSCode either (yet) as it has no benefits to me over my current Vim setup. The only thing I am very interested in using it with is reliable cross-platform C# and ASP.Net development. The current C# integration with Vim sucks. To everyone here using Atom - I wonder what features it has that rival the "real" vim with an appropriate set of plugins? |
@paralin I don't use atom but comapiring to VsCode, is for sure ease of configuration, Ctrl-P install x-addon and I'm done. We all know for vim after downloading (using a manager or not) is usually followed by some configuration. For now I'm using WebStorm (@home) with its Vim plugin which works just fine although you get prone to spam scape a couple more times than whats healthy (it has some issues with menus and vim insert mode). |
@Beatusvir It might be better to try to go the other direction and develop a plugin manager for Vim that doesn't require the long configuration phase you mention. http://github.com/paralin/PersonalJanus There's one manager I use called Janus that's very nice, it doesn't use a long list of plugins to install things but rather opts to just use git submodules. I think it could be cool to develop a CLI tool to pick what features you want, and also make it portable via git (as I've done). Either way this seems a bit out of scope for this repository. But I would like to see proper Vim support in VsCode that doesn't rely on a gimped plugin API. |
Like others said before, the current Vim plugins for VSCode aren't usable yet, though they are great projects. VSCodeVim/Vim is particularly interesting because it's very active and the contributors worked on Vim plugins for Sublime and other editors. I guess one thing that would be great is for VSCode to provide more APIs that could facilitate those projects develop a plugin with better Vim keybinding feel and behavior. The alternative would be to bake in Vim keybindings as a built-in option into VSCode. |
Missing essentials:
Nice to have:
For Editors with good VIM support look at Emacs with Evil or IntelliJ's IdeaVim. |
+1 for
|
Maybe if a plugin would take advantage of the Neovim api to bring in full power of Vim instead of trying to merely emulate vim key bindings. It could be possibly game changing, allowing to tap full potential of vim ecosystem and configuration. |
None of the plugins yet support the "dot" |
yeah |
This is great news! This is the only feature stopping me from switching to VSCode. For me a critical feature is the ability to remap the ESC key (exit input mode). It would also be great if macros were considered at this stage, few implementations of vim mode in other editors support this due to the limited API accessible, and looking into it now could make it possible in VSCode, together with |
I echo the above comments. A single, high fidelity vim mode is key to adoption. Specificaly I rely on full mode support (https://en.wikibooks.org/wiki/Learning_the_vi_Editor/Vim/Modes) including ex-mode, so imho, vim support is more than just a bunch of key bindings. |
pinging @74th |
+1 for VsVim as the initial goal. I use Visual Studio with VsVim full time and am very satisfied. I use the various numbered repeat commands, yank and paste buffers, s/find/replace, dot (repeat last whatever), and q record/replay macros. Also J to merge lines, and the various keys that jump to positions within the current line or file. I would like to start writing C# apps on my personal Macbook Pro for deployment to Linux webservers, and VS Code looks like a great tool for it, but I really need something very close to the feature set in VsVim before I switch away from command line Vim. |
👍 |
+1 with @mswift42 on essentials. You should provide something that helps VsCode-Vim integrate better. Atom has a good enough Vim implementation. For me IdeaVim and VsVim work fine, so the feature sets that they support should be what VsCode offers as well. |
I would look at VsVim (Vim extension for Visual Studio) as an ideal initial goal. |
I'm making this plugin and use VSCode with it everyday. https://github.com/74th/vscode-vim/ It supports numeric arguments and visual mode. |
I agree with mswift42, but I would like to add: The ability to bind keys in a fairly flexible manner is (in my opinion) critical for usable vim support. Many users designate a key called leader, often ','-key, and then bind gt or a to whatever. I' ve personally grown attached to ,gt for "go to (c)tag at cursor" (go to definition) and ,gf for "go to file whose name is at cursor". |
I'm the maintainer of https://github.com/aioutecism/amVim-for-VSCode. |
In vscodevim i still miss surround-plugin for vim and possibility to control all sidebar tools properly with the homerow(or may be i miss something how to do it)(or atleast some plugin compareble to advanced create file in Atom so i can work without the mouse most of my time), and i_CTRL-W that deletes all tabs and a "word" on previous line. It needs just delete all tabs first. |
I just tried vscodevim, but alas, no support for tags (which is marked as low priority). For me this is unfortunately essential, not only to navigate through my code, but often Source Code is the best documentation. |
@monkoose @mswift42 feel free to file issues and add reactions to existing one in https://github.com/VSCodeVim/Vim :) We do have a lot of passionate contributors there and they are willing to help, just lack of feedback sometimes :) |
@mswift42, the reason that tags are low priority is because VSCode already has excellent support for tags. Try cmd-t or ctrl-shift-t. If that's not good enough, you should let us know what specifically is lacking. |
@johnfn On my box pressing ctrl-shift-t does nothing. (This is using Linux). The working Key Combo here is F12, which is far far away from my Homerow. Also, how do I get back ? Under Vim, or Editors with good Vim Support, I'd use Ctrl+] to go to definition and Ctrl+O to get back where I was. |
@mswift42 You just need to learn more about how to rebind keys in vscode. And then just rebind showallsymbols command to a map that you want. Because by default vscodevim override ctrl-T behaviour. |
@monkoose Thanks for that. Of course I'm not interested in showallsymbols, but in navigating quickly between methods / files. |
@mswift42 You can rebind Go To Definition command then. Its easy to do in vscode.
|
@monkoose Isn't Go To Definition in VsCodeVim already bound to the |
@monkoose: And now we are nearly half way there. I press Ctrl+] and am transported to its Definition. |
@hastebrot Yes, seems so forget about it. Thanks. @mswift42 I do not use vscode so much(really miss surround plugin). I think the guys behind vscodevim still do not implement cursor jumps with CTRL-i and CTRL-o. Just checking it sometimes to see how far they go. |
@mswift42 If we're still speaking about vim/VsCodeVim this should be ctrl+o (previous location) and ctrl+i (next location). |
@hastebrot Do not work for me. |
Tested it with |
That's what I was trying to say. To support jumping between tags, gotoDefinition has to save the current Cursor position, jump to the definition, and when Ctrl+O is invoked, going back to stored position. |
Seems VSCode doesn't support this history next/prev functionality. I find nothing in the Update: However there are Go > Back and Go > Forward menu entries. The default (on my system) is: { "key": "ctrl+alt+-", "command": "workbench.action.navigateBack" },
{ "key": "ctrl+shift+-", "command": "workbench.action.navigateForward" }, A vim-like binding would be: { "key": "ctrl+o", "command": "workbench.action.navigateBack" },
{ "key": "ctrl+i", "command": "workbench.action.navigateForward" }, But beware this seems a bit sloppy. Maybe this is also mentioned in the VsCodeVim documentation. |
@mswift42 I trully believe that you can implement something what you need with the marks(they are supported in the vscodevim). Not the full ctrl-o functionality, just jump back to the line where you were. Do not tested myself but vscodevim support .vimrc configs so you can do some mark before jump(autoadd it when you press ctrl+]) and then add another keybindig to jump to that mark. At least for now. Or stick with an editor that you work for now and check this feature later. @hastebrot Seems like working. At least for first glance(may be has some bugs though do not sure). So my comment is useless. |
@monkoose I observed some problems with Update: I could not reproduce the first issue after an update to the newest insiders build. Could be fixed in the update, could also be me trying to reproduce this issue in the wrong files. |
It's been a while since this issue was last looked at, but I did download VSCodeVim today and I am rather pleased with it. It's also offered through the welcome page of VSCode. Therefore I don't see any reason to keep this issue open. Any further enhancement requests should probably go to the VSCodeVim repository. |
This maybe should be a separate issue, but I just tried it and clicking the Vim link didn't do anything. I had to click others link before the menu on the left opened and I saw how to install Vim. |
@daveisfera Curious, the link worked for me. That's actually how I discovered the extension. I wish we had more info on why it might not be working for you. |
Yes Vim support is good now I would say this should be closed. |
It is just a matter of improving the existing APIs and contributing to the existing Vim plugins at this point. The plugins, though not perfect, are useful right now. I agree that this should be closed. |
Is there any Vim plugin that has textobj support implemented? The atom vim plugin supports commands like dif (delete inner function) ci' (change inner ') and so on. Textobj and the Jumpy extension working with the Vim extension are the 2 main reasons I am staying with Atom. The plugins are way more matured and usable in Atom and simply just work as expected. |
@FASA123 VSCodeVim supports text objects. Things like |
You are right. They in fact do work I don't know whats wrong with me wow. Also the af command surprisingly works really well thanks for pointing this out. Also I assume there wasn't any further developement on that whole "multiple-extensions registring hotkeys for the same scope" (Jumpy&Vim) dilemma? In Atom I could register the f hotkey for normal mode to call the Jumpy extension. This combination is really one of the only things missing to me personally anymore. One other question though. Is there a way I can use daf instead of first having to vaf then d? |
Thanks everyone for the contributions in this issue. As some have observed, the remaining work is in the extensions. Therefore, I'll close the issue. @FASA123 @johnfn pls take your conversation to an issue in https://github.com/VSCodeVim/Vim/issues. |
There are a few extensions in the marketplace for Vim, however Vim key bindings is still such a hot request in User Voice. Can VS Code / Vim users chime in on what is currently missing?
The text was updated successfully, but these errors were encountered: