Finally I can use VIM like editing in Visual Studio. Love it! Thank you for your contribution. Would love to see you continue enhancing VisVim for us .NET developers who love VIM.
This extension is deadly necessary for me, because I got used to using vim in linux.. In general it works nice, but I've stumbled into a few problems: - copying from browsers or other programs and pasting into VS seems very fuzy, sometimes it works and sometimes it doesn't (though right-click and paste always seems to work fine)... - Horizontal scroll from my trackpad is moving the cursor instead of the "horizontal elevator scroll bar" (or whatever it's called)
I usually work in linux, but every now and then I have to get things to build under windows to. I find msvc to be a pretty good IDE, but the editor is just not as good as vim. With this plugin I no longer try to print everytime I want to complete something :)
Thanks very much for this extension.
My main problem is that I habitually hit ESC all the time in VS. I hit it whenever autocomplete is suggesting something and I wish to carry on typing something, or perhaps in response to other prompts by Resharper.
This of course changes mode in Vi.
I know how to bind an alternate key to ESC.
How do I completely unmap ESC key after that?
Thanks!
When you want to unmap a key in Vim what you do is map it to <nop>. That essentially says "do nothing". To stop ESC from exiting insert or dismissing intellisense you can execute the following command
:inoremap <Esc> <nop>
Hi, thanks for this great job. I am vim person, this is exactly what I want for visual studio.
However, I have a question.
When I install vsvim at first time, it gives me a pop-up menu asking me to solve the hotkey conflicts. At that time, I ignore it. However, right now, I want to reconfigure that, but I could not find that menu.
Could you tell me how to get that menu or I have to do it in hard way ?
I have tried reinstall vsvim, but the menu does not show up.
Glad you enjoy the plugin!
You can access this menu at any time. On the bottom right hand of the screen, you should see a button name "Options". If you click that it will bring up the conflicting key dialog that will let you fix the issues you are having.
Thanks very much for this extension.
My main problem is that I habitually hit ESC all the time in VS. I hit it whenever autocomplete is suggesting something and I wish to carry on typing something, or perhaps in response to other prompts by Resharper.
This of course changes mode in Vi.
I know how to bind an alternate key to ESC.
How do I completely unmap ESC key after that?
Thanks!
Hello Jared,
I use VS2010 to design Microsoft Report Viewer reports (*.rdlc files).
If you put in any report control there (e.g. a table), then right-click and choose "Expression...", the expression editor comes up where you can write a snippet that computes the value for the control.
That expression editor hosts the standard editor, and when the VsVim add-on is installed it takes over as expected...and breaks down horribly in INSERT mode. For example, the backspace, delete and arrow keys are too eager (they move/delete two characters at a time). When you disable VsVim via Ctrl+Shift+F12, the backspace and delete keys work OK, but the left/right arrow keys shift focus from the editor area of the Expression Editor window.
It works beautifully in the standard code editor, so I don't think my _vsvimrc mappings are to blame. Could the Expression Editor window be the culprit?
Many thanks,
Eric.
Thanks for reporting this issue
I can reproduce this locally so it's unlikely to be a problem with your _vimrc. I'm not quite sure what is going on here but I have a few suspicions. I filed the following issue to track the problem
https://github.com/jaredpar/VsVim/issues/1088
I tracked down this issue last night and made a fix for it. The Report Designer is just processing key strokes in a very odd way. I special cased their designer and was able to get back functionality. This fix will appear in the next release of VsVim.
Note that they are doing some really odd special casing so it's hard to know if I got everything right. If I missed anything let me know and it should be a relatively easy fix.
As for the arrow keys losing focus. This actually appears to not be VsVim fault after my fix. Even with VsVim uninstalled I was seeing focus issues when I moved the caret left (right worked OK). Very strange.
There is no official list of supported commands / motions. The majority of common commands though are implemented and I keep a change log going forward for new commands that are added
https://github.com/jaredpar/VsVim/wiki/Release-Notes
If commands are missing that you feel are necessary, please do let me know
HELLO JaredPar, first of all, THX for this amazing addon.
My former VsVim version is 1.3.1.3, and it works fine. Just now i update to version 1.3.3.3, but the line number is gone.
I wonder why this can happen, after all, with Vim command "line number + gg", browsing can be very fast.
It sounds like you're running into the setting change that happened in 1.3.3.3. VsVim is picking up your _vimrc file and using the vim setting for line numbers which is taking precedence over the Visual Studio settings. Try adding the following line to your _vimrc file
:set number
This should fix the issue for you. Here is a link to a much more detailed explanation of what happened
https://github.com/jaredpar/VsVim/wiki/Defaults-for-Settings
Hello Jared,
I spend a lot of time writing T-SQL code where the tendency is to capitalise all keywords and use normal case for other elements, e.g:
SELECT Foo FROM Bar WHERE Quux = 1
Occassionally I forget to turn off CAPS LOCK when I switch back to normal mode, and then most of the keys don't do what I expect (e.g. I press 'j' to move between lines but since CAPS LOCK is on, it is treated as 'J' which in fact joins lines).
Is there are an option (ideally one you can quickly toggle on/off) to tell VsVim to ignore the status of the CAPS LOCK key? When ignored, one would have to hold Shift to generate upper-case letters which is hard to do by mistake. I know the ViEmu product has this feature, it would be a great addition to VsVim.
Many thanks,
Eric.
No worries on the double post. I can't actually delete posts from the forum though. I'll just use this one as the primary.
There is a bug tracking this feature request
https://github.com/jaredpar/VsVim/issues/350
I'm hoping I can get this into one of the near releases.
Hello Jared,
I spend a lot of time writing T-SQL code where the tendency is to capitalise all keywords and use normal case for other elements, e.g:
SELECT Foo FROM Bar WHERE Quux = 1
Occassionally I forget to turn off CAPS LOCK when I switch back to normal mode, and then most of the keys don't do what I expect (e.g. I press 'j' to move between lines but since CAPS LOCK is on, it is treated as 'J' which in fact joins lines).
Is there are an option (ideally one you can quickly toggle on/off) to tell VsVim to ignore the status of the CAPS LOCK key? When ignored, one would have to hold Shift to generate upper-case letters which is hard to do by mistake. I know the ViEmu product has this feature, it would be a great addition to VsVim.
Many thanks,
Eric.
Hi,
I am having an issue where I cannot set the bgcolor of the block cursor. I use dark color schemes so a black block cursor is bad. I have tried setting the VsVim Block Caret colors in the Visual Studio Fonts and Colors settings, but this never actually changes the color? Is this a bug?
Thanks,
Lee
Hi,
I am facing the same problem when I use the dark theme. Glad to know that there is a solution for this.
However when I go to Tools -> Options -> Fonts and Colors, there is no item called 'foreground color'.
Is this setting located somewhere else, or this foreground color is to be set using some VIM command ?
Please help. I am using Visual Studio 2012 Professional.
Thanks.
Sorry to bother. Found it.
Had to go to Tool -> Options -> Font and Colors -> Select 'VsVim Block Caret' in the Display Items and change Foreground color here.
Hi,
I updated to the version 1.3.3.0(2/3/2013).
Then, TAB key is always changed into 8 indent.
# I specified with VS property that TAB key is 4 indent. But, VS re-start, it will have been returned to 8 again.
Thanks for reporting that issue.
Starting with 1.3.3 if you have a _vimrc file, VsVim will prefer Vim settings over Visual Studio ones. The tab default for vim is 8 spaces which is likely why you saw that change. If you want to have a different default for VsVim you can define a _vsvimrc file in the same directory as the _vimrc file and VsVim will prefer that file.
Note: There was a bug in 1.3.3.0 that caused it to occasionally ignore settings even if you didn't have a _vimrc file. I just released an update that fixes that
Jared, first let me say a big thank you for this amazing amazing tool. You are the definition of awesome!
I have been using key mappings to implement expansions of text (for example when I type "/v" the mapping switches to insert mode and inserts the SQL text "VARCHAR(MAX)"). This doesn't work all the time, especially if the inserted text contains special symbols like "<%= %>".
Does VsVim include support for Vim's abbreviate command? If now, how can I implement "snippet expansions" so I can type a few characters like "psub" and press a key to have that expand to "Public Sub Foo()"?
Many thanks for your help and for hands-down the most awesome VS2010 extension!
Eric.
Glad you're enjoying the extension!
If you can get a consistent repro for the key mappings which don't properly insert text I would love to see it so that I can try and fix it.
At this time I don't implement abbreviations. Here is the bug that is tracking them
https://github.com/jaredpar/VsVim/issues/702
The only way I know of without this to get decent snippet expansion is to either
1. Use VS snippets
2. Setup a key mapping which just expansion
I'm hoping to get expansions into one of the next versions though.
Many thanks for responding! Here is an example mapping that fails:
imap /v <SPACE>VARCHAR(MAX) = '<%= "test" %>'
When I hit the "/v" keystroke it should generate this text:
VARCHAR(MAX) = '<%= "test" %>'
...but VsVim says it can't map it. Successive attempts at mapping reveals it works when I remove the ">", for example this works fine:
imap /v <SPACE>VARCHAR(MAX) = '<%= "test" %'
...but produces junk output because the ">" is a required part of the VB XML literal expression closing delimiter symbol "%>".
Perhaps an extension you can consider in the next version is a special symbol <INJECT> (similar to say <SPACE>) which means "inject everything from here to the end of the line directly into the text buffer exactly as written". That way we can do:
imap /v <INJECT> text-with-arbitrary-characters-here.
Alternatively, to stray true to Vim, you could implement support for Vim's character mapping by decimal, octal and hexadecimal code, e.g. <Char-65> would insert character with ASCII code 65. This way, any characters that cause trouble like ">" can be injected via character code mapping.
Thanks again!
Eric.
Thanks for the detailed repro! I filed the following bug to track this issue
https://github.com/jaredpar/VsVim/issues/1059
My preference is to stay true to vim whenever possible. If Vim can handle this case naturally then it's just a bug that I need to fix (pretty sure it can but I need to check).
I do plan to support `<Char-65>` support as well to help out with cases like this.