VIM emulation layer for Visual Studio

(174) Review
Visual Studio
2013, 2012, 2010
Download (189,871)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (174)
Q and A (194)
Sign in to write a review
Sort by:

by byte1918 | at 1:35 PM

It's the first extension I install in Visual Studio. It's a must have if you ever liked working with VIM. Thank you Jared. Awesome!

by Nathan Friend | July 08 2014

Very impressive extension.

by Matthew199 | July 03 2014

Simply fantastic, how have I gone so long not knowing this even existed! Thank you so much...

by Vinod Pankajakshan | June 27 2014

Vimming in Visual studio is simply mind boggling.. thank you for making this happen Jared Parsons.

by Porges | June 19 2014

by feverforce | June 12 2014

Awesome tool! Can't use VS without it.

by Iain Ballard | June 09 2014

One of the best Visual Studio extensions available. Along with R#, it's one of those "Wouldn't use Visual Studio without it" add-ons.

by Galen Elias | May 24 2014

This is extremely well done, I can hardly tell I'm not in Vim. Would be nice to have a bit more configurability, but overall this is great!

by Joe Egan | May 20 2014

This is always the first Visual Studio extension I install - could not imagine working in Visual Studio without it. VsVim is rock-solid and simply allows me to edit code more quickly.

For the uninitiated (or the Vi-traumatized):

1) It does not take comprehensive knowledge of Vi(m) commands to be much more productive with this extension (or Vi(m) generally). Basic Vi commands (http://www.cs.colostate.edu/helpdocs/vi.html) pack a lot of punch.
2) Yes, I am quite familiar with comparable Windows keyboard shortcuts for many things I do Vi-style using VsVim - and find myself seamlessly interleaving them with Vi(m) commands; TMTOWDI; but Vi is everywhere (including Visual Studio thanks to this awesome extension) and reduces reaches for my mouse and contortion on my keyboard more than anything else I have tried over 20+ years of nerdery.

Highly recommended!

by HoangITK | May 16 2014

I love it!

by Z Sun | May 13 2014

Very cool plugin, definitely made Vim users more productive in Visual Studio.

by Matt Winegar | May 07 2014

Sure, maybe I am using the wrong name for the feature (its really just renaming, not refactoring). In VS, if you highlight (select) a variable name, on the declaration, and type over it with a new name, an icon appears that you can click on to open a menu that says "Rename <old name> to <new name>". Then if you click that, VS updates all of the references to this variable to the new name.

Also, you mentioned C#, which I haven't tried this in. I noticed this in VB, which is what most of the code I am working with is written in. This is not resharper or a similar plugin, as I do not have these for VS 2013 (still vanilla on that).

I don't have to do the renames that often, so I can work around for now by temporarily disabling the plugin and re-enabling when done, with VS restarts. I wouldn't do this for small local variables, but for properties, etc. of classes that are referenced multiple places, this might still be the quickest way, as a workaround.

JaredPar MSFT May 07 2014
| Edit |

Ah, I didn't think about trying that in VB. I've played around with it a bit and I have a theory about why the rename refactor doesn't get hooked up after a select + edit. Going to look into this

by Thumbmunkey | May 07 2014

by Mateusz Stepniak | May 02 2014

Let the Vim force be with you
- in Visual Studio too!

by Martin Rykfors | April 23 2014

I really enjoy using this plugin and the author is doing a superb job maintaining it and responding to bug reports. A great opportunity to learn Vim!

by bumblebeeman | April 22 2014

by ovalsquare | April 11 2014


by Pål Fossmo | April 10 2014

by mwbrady68 | April 05 2014

by James Hart - LegacyTech | April 01 2014

Well done Jared! Now I feel right at home - you saved me a lot of frustration.

1 - 20 of 174 Items   
Sign in to start a discussion

  • Go to start/end of method
    2 Posts | Last post February 11, 2014
    • Great plugin! Use it every day.
      I was looking for a fast way to navigate between C# method declarations, and found the Vim commands ]m and [m. They don't seem to be in VsVim. or am I missing something?
    • [{ and ]} are implemented, and are pretty handy.  Repeated [{ will navigate to the top of the containing code block, so that might be an easy way to get to the beginning of the containing method.
  • AutoCmd support?
    3 Posts | Last post February 11, 2014
    • Hello,
      This works as expected in gVim:
      au FocusLost,TabLeave * call feedkeys("\<C-\>\<C-n>")
      After I added it to my _vsvimrc (in my 'home' folder, C:\Users\hxchba), it seemed to have no effect.
      Is there a 'VsVim' way to get the desired functionality?
      Thanks for providing us with VsVim and making VisualStudio much more useful...
    • Never mind, just found this:  https://github.com/jaredpar/VsVim/wiki/AutoCmd-support
    • FWIW, none of these seem to work:
      au BufWinLeave * call feedkeys("\<C-\>\<C-n>")
      au BufWinLeave * stopinsert
      au BufEnter * stopinsert
  • insert current correct intendation
    6 Posts | Last post January 30, 2014
    • i'm facing the same thing as this guy: http://stackoverflow.com/questions/3718026/vim-indent-current-blank-line-and-insert 
      but none of the 'standard'-vim solutions seem to work for vsvim...
      am i really stuck spamming C-t in insert-mode?
      any suggestions?
    • I'm actually baffled at why the accepted answer works.  When I try that on gVim it doesn't indent the value but instead stays at column 0.  Is there a particular setting I need to get `S` to indent to the column of the line above?
    • S	substitute entire line - deletes line, enters insertion mode
      at least i can imagine how it's supposed to work when autoindent is set... :)
    • I tried that with `ai` set and it's not working.  Essentially I created a file with a line shifted over by a tab, put the cursor below that line in normal mode, hit S and the caret stays at column 0 
    • it surely works here..:
      * freebsd 10.0
      * https://github.com/amix/vimrc
      * vim & gvim
      ~ fire up (g)vim
      :set filetype=c
      ~ write this (whereas _ denotes cursor):
      ~ press ESC and then S - you end up with:
    • It may be a language specific item then.  I'll look into that 
  • Expand folds when jumping to line
    5 Posts | Last post January 30, 2014
    • Hi Jared,
      Minor feature request. 
      When you use visual studio's "Go To Line" dialog (double-click on the line number label in the status bar at the bottom), it will expand folded code if the target line is contained there, then position the caret on the appropriate line.
      VsVim does not do this and seems to stop on the outermost fold containing the target line (e.g. if a fold covers lines 5 to 100 and you do ':20<CR>' to go to line 20, the caret will go to the beginning of the fold at line 5 and stay there). If the fold has been expanded, it will jump to the target line as desired.
      Thanks in advance,
    • VsVim does this because it is the behavior of gVim.  Is there a setting in gVim that will cause it to expand the fold when you use :<number> to jump to a line? 
    • http://stackoverflow.com/questions/10451427/automatically-expand-fold-when-going-to-a-line-number
    • I see! I have never tried using folds in gVim (I edit mainly plain text files there and they are short).
      So what do you usually do when there's a clash between what VS does and what gVim does? In this case I hope the VS behaviour wins (or perhaps a setting could be provided to allow people to choose)!
    • Whenever the action involves cursor movement or placement I take gVim over Visual Studio.  The reason being that most vim guys intuitively know where a given key stroke will take them.  Doing actions like expanding the outlining would break say a jump followed by a yank.  I get lots of negative feedback whenever I break cursor movement even, and sometimes especially, when it is subtle.
      In general though it's not a problem because gVim has a setting that toggles between the behavior.  I can just implement that and hence give people a work around.  I'm trying to determine if there is such a setting here that I can just implement 
  • Designer and report editor
    4 Posts | Last post January 23, 2014
    • Could you add an option or disable VSvim while in report designer from reporting services, also in design mode of webpages would be good sometimes to have ctrl-v because "p" does not work in there :)
      keep up the great work, this extension rocks.
    • I'm not really familiar with the reporting services editor that you are referring to.  Could you tell me how to get to it so I could better judge how to behave there?
    • Hello thank you for the reply, it's included in  the SQL data tools http://msdn.microsoft.com/en-us/data/tools.aspx
      this is the type of project http://i.technet.microsoft.com/dynimg/IC574428.gif
      anyway for now I just remap the orignal ctrl-v so I can paste stuff in designer mode of aspx design view, for the report editor I have to disable plugin due to key stroke strange behavior
    • actualy in this last vers 1.5 only arrows keys advance two spaces in command mode for expression editor, but using "hjkl" it's fine. So it's all good :D
  • Tab to move down auto complete
    13 Posts | Last post January 22, 2014
    • Hi guys just started using vsvim, is there any way to assign tab as the "Down Arrow" equivalent for moving down the list for auto/word completion? 
    • it should be possible to make this work by mapping Tab to Down in insert mode (small bug that needs to be fixed though).  But this would mean that every occurence of Tab would move the key down.  Is that the feature you are looking for? 
    • This sounds like it would move the cursor down when typing, sadly I use tab to indent into lines. Ahwell was a nice thought.
      I do however have another question. I created a _vsvimrc file in my home directory to remap hjkl keys to jkl; using the nnoremap command for each key. Everything works nicely appart from now ; moves the cursor two character to the right instead of one. Is this a bug or can I specify how many characters are moved on the keypress? 
      Sorry for the long question
    • No problem on the long question.  Can you post your _vsvimrc somewhere that I can take a look at it?  Also do you have any other extensions installed?  It's possible one of them is interferring here and causing the double behavior.  
    • I have extensions for git, sql server and a comment spell checker but the problem still occurs with these disabled. Here is a dropbox link to the _vsvimrc file 
    • Thanks for the vsvimrc file.  I will take a look at that
    • I look forward to what hearing about what you find
    • hello.
      I have this issue but only on reporting services 2012 reports editor (it uses VS2010), for example while editing an expression. But on normal VS2010 projects it's ok.
    • I'm aware of some issues with the report editor. They intercept key strokes in a mom standard way and I'm working on a fix for those issues. This could be related 
    • Any ideas on what might cause my problem?, I should have mentioned im using Visual Studio 2012, thanks again
    • Sorry for the delay, I just debugged into it today and figured out what is going wrong.  The issue is that there is a single space after the 'l' character on the 'nnoremap ; l ' line.  This means that when you hit ';' it runs the key sequence 'l<Space>' which causes the cursor to generally speaking go right twice.  
      This is strangely enough the behavior that gVim displays.  It considers any trailing white space on the line to be part of the mapping
    • Arg, soooo sorry for this I never noticed 
    • Not a problem.  It's *really* subtle.  I actually had to bring up VsVim in a debugger to see what was going on.  
  • Inconsistent behaviour when highlighting with mouse.
    3 Posts | Last post January 15, 2014
    • Hi Jared,
      Here is an issue that has confused me for a long while now. 
      If you have text "ABCDE" then use the mouse in normal mode to highlight the letters, going backwards from E to A is inclusive - the highlight will select all the way up to and including letter A where the block cursor will be blinking. 
      If you do the same going forward from A to E, it only highlights to letter D, and the block cursor blinks over E which is not included in the highlight. To get E included you have to extend the highlight one character beyond such that the block cursor rests to the right of E when done.
      Performing the highlight using the motion commands seems to work inclusively in all directions - the character beneath the block cursor is always included in the selection. Can this be behaviour be used when using the mouse too?
      Many thanks,
      PS: I have virtualedit set to "onemore" in my _vsvimrc file - dunno if this makes a difference!
    • It looks like this is just a bug in the highlight code.  I tried some samples in VsVim and gVim and it looks like I'm doing reverse selection incorrectly in some cases.  I will look into getting this fixed 
    • Awesome, thanks in advance!
  • folding
    3 Posts | Last post January 09, 2014
    • Is there zm/zM/zr/zR support somehow? zo/zO/zc/zC/za/zA seem to work as intended...
    • The zR, zM commands are definitely supported.  Are you seeing some unexpected behavior with them?
    • oops - zR and zM work, but zr and zm dont :) sorry, my fault
  • freezes my VS 2012
    5 Posts | Last post January 07, 2014
    • Is there any way for me to install a previous version of your wonderful plugin? This recent version freezes Visual Studio 2012 when I open a file (I have no other active plugins).  Please help!  I am addicted to VsVim and am suffering withdrawals.
    • I'm sorry you're having problems.  Previous versions of VsVim are available here 
      Manually uninstall the current version, down load the previous version, double click on it and it will install.
      If you have a few minutes though I'd really like to figure out what is going wrong here.  Otherwise the bug will persist into future versions :( 
      The most likely cause is either a line in the _vimrc which is putting me into an infinite loop.  Could you post your _vimrc somewhere that I could take a look at? 
    • Thank you!  I installed version and it worked right away.  
      Here is my vimrc: https://gist.github.com/jonashw/8275182
    • Thanks for the vimrc.  That indeed appears to be the problem.  Got an immediate hang when I used it myself.  Will have a fix for the next release (comes out in a day or two).  
    • You stud.
  • Quick Find Window Breaks Normal Mode
    5 Posts | Last post January 05, 2014
    • Hi Jared, happy new year in advance!
      I am using VS2012 and VsVim and was surprised to find that when the Quick Find window is active in the editor (do Ctrl+F and it pops-up on the top right), the normal mode commands are completely ignored (e.g. pressing 'gg' to jump to the beginning of the editor is ignored and the letters appear literally). When you press Esc to dismiss the Quick Find window, the normal mode commands work again.
      Is this by design or is the Quick Find window somehow responsible?
    • Happy new year to u as well!
      That behavior is by design. In general VsVim will defer to VS UI when it is being displayed (intellisense, quick find, smart tags, etc ...). Once it's dismissed VsVim will take over again 
    • That makes sense, especially for intellisense and smart tag popups which are on the screen for few seconds. 
      There's often a strong urge to navigate using VsVim commands when Quick Find is active so if VsVim could defer only the keys that are required by the active popup (in the same way you can tell it to let VS handle some common shortcuts), that would be pretty neat.
      Many thanks for your continued work on this awesome extension!
      PS: does the 'ge' command work? In classic Vim, it jumps to the last letter of the previous word and I can't seem to make it work in VsVim :(
    • Unfortunately it's hard to tell what is or isn't accepted by the pop up.  Every version of VS adds more short cuts and it would be a constant battle to keep up with them. Especially since some shortcuts actually change based on the current input language of VS. I worry it would be hard to do this without the implementation being flaky. 
      As for 'ge' this isn't implemented yet but I will look at getting that done. Should be fairly easy 
    • I have often marvelled at how completely alien VS feels when you change the language (I code in VB2012) so I can see the nightmare of trying to track each shortcut. I am no expert on the internals of VS editor keyboard handling, but if it has something akin to the KeyEventArgs.Handled property, perhaps you could use that to detect cases when keystrokes such as 'gg' are not handled by the pop-up, then handle them with VsVim logic.
      I look forward to the 'ge' command along with its sisters 'g;' and 'g,' which are used to jump around the change list (the g-semicolon one is handy for example when you paste something in normal mode then want to jump the cursor back to where the paste began so you can add a space to separate the pasted text from the text that precedes it).
      Thanks as always!
31 - 40 of 194 Items