This plugin is fantastic, I've used vi and vim forever, and had always hated having to use the Visual Studio editor. Often I would go back and forth between vim for editing outside of VS, and then switching back to the VS editor when I needed the intellisense. You don't know the sense of relief I feel when I using vi within VS, I feel like I'm getting away with something.
This extension has really come a long way. In some ways, it works better than the commercial solution I had previously been using. Great work -- looking forward to many improvements down the road!
It's totally awesome! I've been using VsVim for about a month now and even though there is much to do it's a really terrific project. Are there plans for Microsoft to devote resources to this project? Do we need to start a web campaign to get Scott Gu's attention?
I think this extension is truly awesome despite its inability to emulate certain things in Vim. Keep in mind that the extension is constrained by what is allowed/can be done within the framework of Visual Studio extensibility.
I downloaded and tried to install on “visual studio 11 express for windows developer preview (win 8)”, and failed with a pop up saying “This extension is not installable on any current installed product.”
If it's supporting visual studio 11 beta, then I'll try again there. It's a awesome extension I must install.
Ok the problem there is you're using an express SKU of Visual Studio. The express SKUs don't allow the loading of any meaningful extensions and hence VsVim can't work there. If you download Professional or better it will work
So lovely to be able to use Vim in Visual Studio 2010. I've used VI since 1988 and it's always been a pleasure. In fact I used to carry a DOS version of it around on a floppy disk so I could use it wherever I worked. Now I am using the nearest equivalent to it in 2012. Marvellous! Thank you for VsVim.
Thanks for the review! Note that CTRL-V works on the current released version of VsVim. But given the default behavior of CTRL-V being paste in Windows you have to manually switch the key to be controlled by VsVim. Block insert will be available in 1.2 (already implemented, release should be out in ~2-3 weeks).
I installed vsvim on two computers and in both instances I began having issues in visual c++ where using a variable i would autocomplete to identity. I've never had an issue like this before so I can only attribute it to vsvim. being an intro programmer and wanting to learn vim on the side as well as being stubborn led me to turn intellisense off for the time being, but just thought I'd post this here.
Do you have any other extensions installed? VsVim is designed very much to not interfere with Intellisense and play as nicely as possible. In insert mode it shouldn't affect the experience in any noticable way.
18 sometext1
19 sometext2
20 sometext3
Placing cursor at line 20 and then executing :.mo 18 results in
18 sometext1
19 sometext3
20 sometext3
Seems like sometext2 gets clobbered?
Moving down works ok though, executing :18mo 20 results in
18 sometext2
19 sometext3
20 sometext1
I am using Visual Studio 2010 and VsVim 1.2.2.0. Not sure if this is one of the known issues.
Thanks for taking the time to report the problem. This is indeed a known issue and will be fixed in the next version of VsVim. Here is a link to the bug tracking the issue
https://github.com/jaredpar/VsVim/issues/857
For instance, :cn, :cp to navigate through the error list? I can't seem to figure out if it supports it or not as it's not working and google doesn't suggest that it should either way.
At this point the :cn and :cp commands aren't yet implemented. I'm trying to squeeze them into the next version. The issue tracking them is here
https://github.com/jaredpar/VsVim/issues/875
Sometimes Ctrl+O and Ctrl+I function as expected (navigating forward and backward through the jump list) and sometimes they do not. I have not detected the pattern of when they do not work as expected. Any thoughts?
hi
thank you for great plugin!!!
is it possible to enable virtual space (cursor may move beyond end of line) in all modes of VsVim? same as it is done in vim by command
:set ve=all
thank you
Hi there,
I'm not familiar how Windows works but could it be possible to have this plugin working in all text fields (windows forms text boxes) on a OS level? Would this include applications like Word/Outlook/TextEdit or don't they utilize windows forms? I know of a few vi plugin efforts on OSX which do this for NSTextField.
But its just an idea ;-)
Unfortunately it's not possible to plug it in at this low of a level. VsVim is largely based on the core Visual Studio editor. It's a hostable component in any place that the core Visual Studio editor is hostable. This is done in a few products but not at the low level of OS text boxes.
First of all, I really enjoy using vim extension. It's awesome!
I do have a couple of questions I hope to have answered.
Is it possible to paste to the command line? In Vim, you can press "<ctrl>-r" followed by a buffer to paste the contents of said buffer to the command line. I find this to be very useful.
I am having trouble getting "vsc" to work when mapping keys in my _vimrc. For example, I have tried the following:
map <Bslash>c :vsc Edit.CommentSelection<CR>
If I type "\c", I get a "Parse error" and the following is in my command line history: ":vscfEdit.CommentSelection". I have tried several variations, but the "f" character seems to always replace the space between ":vsc" and the vs command I am trying to execute. Can you tell me how to get this to work?
Thanks!
Right now it's not possible to paste to the command line. It's a known issue that I hope to have fixed for version 1.4.
As for the "vsc" command I'm not quite sure what's going on there. I'm able to use that exact command locally with no issue. What keyboard layout do you use? Have you tried the mapping without the use of `<BSlash>`?
Thank you for the reply. Sounds good, regarding command line pasting. I'll look forward to it.
I'm not sure what you mean regarding "keyboard layout". I have tried the following, but the same issue with the "j" occurs:
map <F3> :vsc Build.BuildSelection
I forgot to add the <CR> at the end of that mapping, but it was there during my test. In fact, the easiest way to reproduce this issue is to just do this from the command line:
:map <F3> :vsc Build.BuildSelection
and then press the "F3" key.
The following shows up on the command line:
:vscfBuild.BuildSelection
Hmm, I'm going to have to chat with some other people to see if we can come up with what's going on here. There was an outside chance that if you were using a non-QWERTY keyboard layout that it could be the reason. Outside that though I can't imagine what would cause this behavior.
Your comment got me thinking that I should check my _vimrc for anything suspicious. I found the following mapping:
map <Space> <C-f>
I removed that from my _vimrc and now things are working as I would expect.
Would the proper way to map space to do a page down be something like this?:
nnoremap <Space> <C-f>
Anyway, I appreciate your help and the work you've done making this vim extension so awesome!
That entry in the _vimrc definitely looks like the problem. Thank you for checking!
I believe the nnoremap path is the correct one. I need to check though to be 100% sure
I just started using this extension. This is great.
I have a few questions.
1. Named clipboard feature does not seem to be compatible with visual(v) or visual line(V) mode. For example, I cannot type "ay because it switches back to normal mode once I hit ".
2. Similarly, I cannot navigate by h/j/k/l in visual or visual line mode. Arrow keys work anyway and expands selection, but I dislike arrow keys.
3. If I hit '(' once in a second or two, cursor navigates backward. However, repeatedly hitting '(' causes unexpected behavior that '(' is actually inserted into my code.
4. An option to ignore CapsLock is needed, especially when it comes to 'J' keys.
Issues 1-3 are definitely unexpected. It sounds like there is something on your box that is interfering with the key strokes. What other extensions do you have installed?
As for the caps lock problem I do have a bug tracking getting that added as a feature
https://github.com/jaredpar/VsVim/issues/350
Is it possible to configure VsVim 1.2.2 to behave similarly as gVim when it comes to Highlighting while in Insert Mode. With gVim I can highlight a section press <ctrl>-c and then move the cursor to the desired location and press <ctrl>-v. However with VsVim, as soon as I highlight a section I am placed into Edit Mode and have to press i again. Is there anyway to fix this?
I'm not quite sure what feature you are describing here. I tried your reprothat didn't produce any noticable effects. Could you give me a bit more detail here? What mode are you starting from and what exact steps did you take?
Highlighting has differing behavior in VsVim as gVim.
What I originally did was opened a file, pressed "i" to enter Insert Mode, used the mouse to highlight some text, used the mouse to click the copy button and then clicked the mouse to place the cursor at some location. Now in VsVim I am in Edit mode and must press "i" again to enter Insert Mode. With gVim, highlighting doesn't exit Insert Mode so I don't have to press "i" again. So it seems that highlighting in VsVim causes the mode to switch from Insert to Edit in most situations.
I also noticed the following behavior:
With VsVim, if I enter Insert Mode, highlight some text and press the Delete key, I am left in Insert Mode and continue typing. In VsVim, if I'm in Insert Mode and I highlight something and then click elsewhere, I am in Edit Mode and must press "i" again to enter Insert Mode.
With gVim, highlighting never causes the mode to change from Insert to Edit so I can highlight and click elsewhere and I'm still in Insert Mode.
Does this make more sense?
When i try the same scenario in gVim I get moved into Visual mode as soon as I select some text. Are you setting some custom value that allows selection to stay in insert mode?
The only thing that I am setting in my vimrc is "behave mswin". I am included my vimrc below for you to look at.
Thanks for all your help so far.
behave mswin
set nobackup
set nowritebackup
set noswapfile
set ai
set et
set shiftwidth=3
set softtabstop=3
set diffexpr=MyDiff()
function MyDiff()
...
endfunction
Grabbed the wrong vimrc, I have the following in my vimrc file:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set nobackup
set nowritebackup
set noswapfile
set ai
set et
set shiftwidth=3
set softtabstop=3
set diffexpr=MyDiff()
function MyDiff()
...
endfunction
It looks like it is indeed the behave mswin line that's causing the difference in the behavior. I filed issue #847 to track implementing that in VsVim
https://github.com/jaredpar/VsVim/issues/847
I tried out the extension but ran into some speed issues. As part of troubleshooting to determine which extension was causing the problem I need to disable VsVim. But I noticed that disabling it leaves VS in an unusable state (enter, delete, etc. do not work at all).
I read the FAQ, which states that "There are two options for restoring the settings. The first is to use the Vim Options page (accessible via the Options button on the margin). From here you can reset the key bindings back to their original state."
But where is the Vim Options page? "On the margin" is very vague, but I have looked everywhere I can think of and I don't see an Options button on the margin of anything.
Thanks.
Sorry you're experiencing problems. The Options button should appear on the bottom right hand side of the file that you're currently editing. If this doesn't work though uninstalling VsVim and then resetting your settings via Tools -> Import / Export -> Reset Settings will achieve the exact same effect.
I'm curious though what problems you're experiencing? In general VsVim is very stable and I actively work to make it play nice with other extensions.
Thanks for responding Jared. I found the Options button. :-) Right in the margin like it said!
I have installed the following extensions installed (in order of installation): NCrunch, Razor Single File Generator for MVC, Productivity Power Tools, VS Commands 10, and VsVim.
The problems I have experienced are:
1. Momentary lockup of the environment. Lasts from 1 to 5 seconds.
2. Syntax highlighting of view pages randomly changes to something different after environment has been open a while.
So I thought I would disable the last installed extension to see if that fixes the issues. I will work backwards through the list, and try different combinations until I figure out which one or combination is the culprit. I'll let you know what I find.
Thanks for the reply!