vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Vim Style Key binding

Open waderyan opened this issue 10 years ago • 108 comments

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?

waderyan avatar Mar 01 '16 18:03 waderyan

ping @jasonyueyang

waderyan avatar Mar 01 '16 18:03 waderyan

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.

waderyan avatar Mar 01 '16 18:03 waderyan

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 avatar Mar 01 '16 18:03 kellyelton

@kellyelton have you opened bugs on their extension? They seem to be pretty responsive and have closed a number of issues.

waderyan avatar Mar 01 '16 18:03 waderyan

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.

NickClark avatar Mar 01 '16 18:03 NickClark

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.

Beatusvir avatar Mar 01 '16 18:03 Beatusvir

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.

kellyelton avatar Mar 01 '16 18:03 kellyelton

@NickClark that list would be excellent. @Beatusvir good suggestion and I hope to help this happen.

waderyan avatar Mar 01 '16 18:03 waderyan

And in case you were not already aware :grimacing: , 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.

NickClark avatar Mar 01 '16 18:03 NickClark

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 avatar Mar 01 '16 18:03 paralin

@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 avatar Mar 01 '16 18:03 Beatusvir

@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.

paralin avatar Mar 01 '16 18:03 paralin

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.

andradei avatar Mar 01 '16 19:03 andradei

@waderyan awesome that you guys are actively looking into this - I am pretty happy with vim-support in VsVim, WebStorm and Atom and I would love to give vscode another look as soon as the vim-story is decent. Maybe @jaredpar could give some hints on what to look out for.

mpseidel avatar Mar 01 '16 19:03 mpseidel

Missing essentials:

  • Numeric arguments (3dd, 2x, ...)
  • support for combining commands (ci[, cW, ggVG, ...)
  • visual commands
  • window interaction support, split windows, close windows, switch windows, ...

Nice to have:

  • Cursor customization: Give me the possibility to customize the form (block or line) and color of the cursor, e.g. for Normal Mode, I'd like to have a green Block cursor, in insert mode a red line cursor.
  • vim leader support.

For Editors with good VIM support look at Emacs with Evil or IntelliJ's IdeaVim.

mswift42 avatar Mar 01 '16 20:03 mswift42

+1 for

support for combining commands (ci[, cW, ggVG, ...) visual commands

mpseidel avatar Mar 01 '16 20:03 mpseidel

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.

luolong avatar Mar 01 '16 20:03 luolong

None of the plugins yet support the "dot" . command, which repeats the last action. That is really important. VsVim is excelent, it works as expected. That should be the goal.

giggio avatar Mar 01 '16 20:03 giggio

yeah . and ; are important to me too

mpseidel avatar Mar 01 '16 20:03 mpseidel

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 . and ;

steinso avatar Mar 01 '16 22:03 steinso