VIM emulation layer for Visual Studio

(221) Review
Visual Studio
2015, 2013, 2012, 2010
Download (259,988)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (221)
Q and A (220)
Sign in to write a review
Sort by:

by AhmedElSayed | Tue 12:41 AM

by Chandra Sekar Narayanan | Mon 8:19 PM

by RIscRIpt | Mon 8:55 AM

by Aaron Lockhart | June 25 2015

by zxzl | June 25 2015

With VsVim I can enjoy advantage of powerful IDE and light text editor together!

by PeriMCS | June 03 2015

First thing I add to VS. Even before Resharper!
I wish it could be used in Management Studio.

by melihov | June 01 2015

by Justin Domingue | May 15 2015

by FlyingToaster | May 14 2015

Really, truly great, and always improving!

by NPS_Nat | May 13 2015

I use this plugin every single day at work. So happy I can use vim with VS. Very solid.

by CepsPrin | May 03 2015

Great extension, best part is it reads your vimrc file and works with your custom keys, excellent!

by _sotomo_ | April 29 2015

As someone who'd like to learn more about VIM, I'm finding this to be both a useful and educational way to get started. If you are new to VIM, I'd recommend checking out the "VIM Tutor" text file.

by pjwhams | April 17 2015

Massively useful. The very first extension I install

by Yiheng Tao | March 31 2015

Must have :)

by Andy Yong | March 30 2015

This is a must have for any VIM user. Integrate nicely with VS.

by mboren | February 26 2015

This extension is phenomenal. It implements a lot more than I would have expected.

by Eduardo A. C. de Sousa | February 26 2015

Great extension! Can't live without it anymore.

by Ammar.Zaied | February 13 2015

good job, thanks.

by TrevD1 | February 12 2015

Great plugin, thanks! Includes a lot of vim functionality!

by keith0930 | February 10 2015

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

  • Navigating between window splits
    3 Posts | Last post November 21, 2014
    • Hey Jared,
      I've been debating making the jump from ViEmu to VsVim for better config support via vimrc (currently the only usable mapping that makes sense is 'nnoremap <esc> :noh<cr><esc>'), but I'm struggling with navigating between window splits. I've figured out splitting via command mode with :split and :vsplit but normal mode commands <C-w> s, <C-w> v, and <C-w> w do not work. I haven't found a way to move between horizontal splits without using the mouse, and I can't navigate between vertical splits at all without using <C-tab>.
      Using ViEmu, I'm used to gt and gT taking me to the next buffer, regardless of tab well, though I appreciate the difference in VsVim where every open tab is treated as an open buffer, there's no indexed buffer list (:ls) so I can't jump to a given buffer (:b1 :b2 etc) without cycling through every open tab. I'm also unable to open a new buffer (:e SomeFile.cs) which keeps me reliant on the solution explorer search.
      I feel like I'm missing something fairly major, but I've searched and all the ways of splitting and navigating splits and buffers doesn't seem to be supported outside of :split and :vsplit
    • Hey Warren,
      As for the <Ctrl-W> commands I just wasn't aware of them.  I've been using the :split and :vsplit commands for as long as I can remember and had never seen this alternative.  It's fairly easy to implement and I filed the following issue to track getting the work done 
      As for the buffer list.  Vim and Visual Studio unfortunately have a very different understanding of how buffers work.  A couple of times I've tried to map out how the buffer commands should work in the world of Visual Studio but I've been unable to convince myself of a model that made a ton of sense.  If you have any ideas here I'd love to hear them. 
      For :e the command is implemented today but has no sense of relative path.  How are you expecting the path to be resolved here?  Relative to the current project, solution, etc ...? 
    • Hey,
      As far as a buffer list goes, it would be nice just to use :ls to get a numbered list of files that are open, you don't necessarily need to treat a vertical split of the same file as separate buffers. gt and gT would cycle numerically through the buffers forwards and backwards (alternate commands are :bn and :bp), as well as :b n to jump to buffer n. The ordering of that list is entirely up to implementation I suppose. Tab order is the initial thought, but multiple windows, screens, and tab wells complicate things. If VS has a way to progressively iterate through those by level (window, well, tab) that I guess would be the simplest way to go, since "order opened" doesn't make sense when opening a project with files already open. ViEmu only places a file in the list if you've made changes to it during that session or it was the first file with focus, but then you have to :e FileThatIsAlreadyOpen.cs to be able to jump to it. It's not the worst idea, I suppose.
      for :e, I just tried using it and even from a file in the same folder I get "The document cannot be opened. It has been renamed, deleted or moved." I'm used to typing :e fileiwant.cs non-case sensitive regardless of path, sort of like a quick find, though I don't have many projects where the same file exists in multiple paths so I never thought about the particulars of path relevance. If one were to build in path relevance if path is specified, it should probably be from the solution root.
  • vimball plugin in vsvim
    3 Posts | Last post November 17, 2014
    • Hi.
      Is there a way to install a .vba plugin in vsvim ?
      I want to install Align ( http://www.vim.org/scripts/script.php?script_id=294)
    • Unfortunately VsVim does not support vim style plugins.  VsVim does have some support for the vim script language but not nearly enough to support extensions.  
      There are a number of alignment extensions out there for Visual Studio which may help you
      I'm not sure if they target VBA or not though.  
    • thank you, i will try that now
  • :g/re/p give error msg --> Undo linked chain broken.
    3 Posts | Last post November 06, 2014
    • First, thank you for the app. Excellent work.
      I frequently use :g/re/p to print all the lines in a file matching /re/. I am getting the following when I do so:
      Undo linked chain broken. Falling back to Visual Studio undo
      Is this a configuration conflict or a bug? 
      Thanks for your help with this,
    • Thanks for reporting this!
      This is a bug.  In the most recent release I fixed a number of undo / redo bugs in VsVim and really tightened the diagnostics around it.  What you are seeing here is a place where the tightened diagnostics are incorrectly firing.  I just uploaded a fix for this bug and it will appear in the next release 
    • Thanks Jared
  • vimrc settings not getting picked up by my Visual studio 2013
    2 Posts | Last post November 05, 2014
    • I had read the faq and when I type :set in Visual studio, I get the below.
      The following is what I have in "C:\Users\allai\_vimrc",
      I tried different things.
      1) shiftwidth=5
      2) set shiftwidth=5
         set tabstop=4
      3):set shiftwidth=5
        :set tabstop=4
      Seems to have no effect to visual studio.
      Any idea What I am missing?
    • Hmm, not sure why it didn't work before But I did got it working now...
      set shiftwidth=4
      set tabstop=4
      set hlsearch
      set ignorecase
      set incsearch
      set smartcase
  • I can't find the option button
    4 Posts | Last post October 06, 2014
    • Hello, 
      I want to reconfigure the key bindings, but I can't find the option button that you mentioned it would be located in the right-bottom in editor windows. 
      I'm using visual studio 2013 professional. How can I reconfigure the key bindings or find option button?
    • In recent versions the Options button has moved to the Visual Studio Options menu.  Go to Tools -> Options and navigate to VsVim in the dialog that pops up.  The old menu is in that section under Keyboard
    • Thanks for your reply! But, I can't find the VsVim popup when I search VsVim in the dialog of the options! Hmm.. T.T
    • Did you type VsVim into the search box or just scroll down?  Don't think searching is supported but VsVim will be there if you scroll to the bottom.  
  • Skip some vimrc commands in VsVim
    2 Posts | Last post September 12, 2014
    • Hi Jared,
      I have been using vim on windows for a while and have a good setup. Doing some VisualStudio work and VsVim has been working great for me. I have discovered a few plugins and keybindigs simple do not work, and reading through the notes found that they are not supported. That's fine, but I still want them for normal vim.
      Is there a way to exclude some vimrc lines from execution is VsVim? I searched the docs and could not find anything. I have exclusions for different OSs. I was hoping there was an env variable I could use to exclude a few items.
      Thanks for the help, 
    • One approach is to have a separate vimrc file for VsVim. If u have a file named _vimrc then VsVim will prefer that over a standard _vimrc. This is what I do. 
      I have thought about adding a VsVim variable for use in an 'if' block jn the rc file.  This will very likely happen for a future release but isn't implemented yet. 
  • VsVim does not remember selection for conflicting keyboard mappings
    3 Posts | Last post August 25, 2014
    • Hi Jared,
      I have mapped the Shift+Enter keys as follows: 
      imap <S-CR> <ESC>ma:w<CR>'a
      ...effectively it switches out of normal mode, creates a mark named 'a', saves the file, the jumps the mark 'a'.
      Works like a charm, except this key mapping seems to conflict with a VS one and so I go to the VsVim keyboard options and say that Shift+Enter should be handled by VsVim rather than VS. And it works, but after restarting the IDE the setting is lost and I have to set it each session. This problem was there even before you moved the VsVim options to the standard VS options dialog.
      Can you repro or am I missing something?
      Many thanks for looking into it,
    • Thanks for reporting!
      There are certain key bindings that are reset on every start of Visual Studio, it looks like this may be happening here.  If that is the case then I can set that command to be reset on every start up.
      Unfortunately I can't really do this for every bound command.  Checking key bindings is actually a relatively expensive operation (causes the disk to be hit quite a few times).  Hence I have to be very selective about when to check them else perf goes in the tank :( 
    • I tend to hibernate my laptop so a VS restart happens about once every 45 days meaning the problem is not all that bad. 
      To keep perf in check, perhaps you can check the bindings asynchronously and restore them or (more predictably) save them somewhere and provide a "restore" command that one can map using VS's standard keyboard mapping dialog, then execute manually as required.
      Many thanks!
  • Non-Latin language support in command-line window
    3 Posts | Last post August 24, 2014
    • Hello,
      First of all, thanks for the great software.
      I have a small bug fix wish for VsVim. Currently, it is impossible to input non-Latin characters in the command-line window. It seems the command-line windows does not handle IME messages correctly. Some Asian characters need to have so-call candidate state before they are realized as real characters. What I get is every single possible combination of characters during the composition and it is hardly usable for searching non-Latin words, etc.
      I hope the fix is easy.
    • Thanks for reporting that issue!
      Can you give me a bit more detail on the bug?  In particular some examples of how you are trying to use IME within the command line window?  
      I don't have a lot of experience with IME hence I need a bit of help to reproduce the problem.  Once I have it in front of me I should be able to get this fixed.  
    • Thanks.
      I will post a tweet at @jaredpar with a screenshot to explain the issue graphically.
  • Semantics of 'p' different to standard clipboard Paste behaviour.
    3 Posts | Last post August 19, 2014
    • Hi Jared,
      This may be a Vim quirk, but it has been confusing me for a while. With standard text editor Copy/Cut/Paste commands, the action of pasting does not alter the clipboard contents which allows you to paste the same thing repeatedly. Suppose you have:
      With standard commands, I can double-click on GoodWord to highlight it, hit Ctrl+C, then double click on BadWordX to highlight and hit Ctrl+V to paste and overwrite it with the word GoodWord. If I double-click BadWordY to highlight it again, with standard commands a paste will insert "GoodWord" as expected, but with VsVim's put command the text inserted is BadWordX (which was just overwritten in the last action), not GoodWord.
      It seems like the put command, when executed while Visual mode is active (i.e when something has been selected in the editor), will do a swap: the contents of the clipboard enter the selected area, and the contents of the selected area go into the clipboard. Invoking put when there's no selection will correctly insert the clipboard contents and leave the clipboard unaltered (so you can repeat it several times to paste the same text over and over again).
      gVim exhibits the same behaviour so VsVim is doing the "right thing" Vim-wise, but would it be possible to get a switch that turns on the Windows Paste semantics?
      Many thanks as always for your superhuman efforts maintaining VsVim!
    • Can you post your _vimrc somewhere I can take a look?  I'm pretty sure you can get this behavior with a combination of settings that are supported by VsVim.  
    • Sure: I sent you an attachment via email with the subject "Making 'p' in Visual Mode behave like Windows Paste."
      While researching how I may do this I came across the handy '[ and '] commands that move the caret to the start/end respectively of the text just pasted. Hope those will make it into VsVim sometime (apologies for bundling it here with another request).
  • Strange behavior in .cshtml
    10 Posts | Last post August 14, 2014
    • Latest vsVim in VS2013.
      I have this line in a .cshtml file:
         @Html.ActionLink("CM Demo", "Index", "CM", null, new { @class = "navbar-brand" })
      Editor is in normal mode.
      If the cursor is in one of the quoted strings ("CM", for example).
      When I use this command:
      I end up with this, editor is in insert mode:
         @Html.ActionLink("CM Demo", "Index", "C" +
                                               "M", null, new { @class = "navbar-brand" })
    • This should be fixed in the next version which is coming out on Monday. 
    • Problem still exists, VS2013, VsVim, ReSharper 8.0.2.
      @model DateTime
      @Html.TextBox("", Model.ToString("MM/dd/yyyy")) 
      ** TODO Wire up the date picker! **
      If the cursor is in the quoted string (in the "dd", for example), :w results in:
      @model DateTime
      @Html.TextBox("", Model.ToString("MM/d" +
      ** TODO Wire up the date picker! **
    • Hmm, it looks like my fix is only working a portion of the time.  There is a subtle startup race condition.  Looking into a more thorough fix 
    • Has this issue been addressed?  I'm still having it with VsVim, VS 2013 Update 2 and Resharper 8.2.1
    • I should also add, I LOVE VSVIM!  Thank you so much for it.
    • This ended up revealing a bug in Visual Studio that was fixed in 2013 Update 3.  Fully fixing this issue may require some work on my end even after the update though.  Hoping to get it installed and tested out sometime in the next few days 
    • Thanks for the update.
    • Even after updating VS2013 to update 3, insert behavior persist.
      Can u tell me when this would b fixed?
    • This bug is tracking all of the remaining work for :w in CSHTML files (post Update 3).  
11 - 20 of 220 Items