Remove Shortcut Added by NCrunch from VS - visual-studio

I use the Visual Studio VsVim extension, I've recently installed NCrunch which seems to have grabbed the CTRL+R shortcut.
How can I 'return' this shortcut to VsVim?

Try the following
Click on the Options button. It is on the bottom right of the editor screen
Look for Ctrl+R. Switch control to VsVim
If Ctrl+R doesn't appear in that menu please let me know and I'll provide an alternate method

Related

In Visual Studio, what is the keyboard shortcut and Command ID to "search/query everything box"

In Visual Studio 2021 or above what is the keyboard shortcut (KeyMap) Command ID to the "search everything box"? This box is displayed top right of IDE menu bar. It offers a global search including, IDE actions, menus, commands and symbols within code.
The default Ctrl+Q is NOT assigned on my config, used for something else.
Please see the screenshot:
Could not find the correct command in KeyMap. For information, in JetBrains Rider, this command is called "Search Everywhere".
On my installation of VS 2022 the placeholder text within the search box is "Search (Ctrl+Q)".
Pressing this shortcut in the keyboard mappings yields the Shortcut Window.QuickLaunch
The page you linked to also shows this is the default settings for Window.QuickLaunch.
According to Visual Studio documentation
Use the Ctrl+Q keyboard shortcut to access the search box
Advance Shortcuts:
The search results include tabs for All, Code, Visual Studio. You can save time by using the following keyboard shortcuts for different types of searches:
Ctrl+Q, Ctrl+T for files, types, and members
Ctrl+Q, Ctrl+M for Visual Studio menus, options, components, and templates
Ctrl+Q, Ctrl+E to go to the All tab, for both
Please try with Ctrl+Q it is working fine in visual studio 2022.

Visual Studio code completion like ctrl+k in netbeans?

My question is there code completion for Visual studio like in Netbeans where you cycle the buffer with ctrl+k, when you type something?
There's now a nice extension called Simple Autocomplete which adds one command simpleAutocomplete.next that you can map to a shortcut of your choice.
No, there isn't a similar feature in Visual Studio.
The traditional Visual Studio autocomplete is using intellisense.
When you start typing, intellisense may bring up a drop down with suggestions. In that case you can tab to complete using the current suggestion or use the arrow keys to choose another.
Ctrl-Space (or Alt-Right arrow) will bring up this intellisense menu if it's not up.
I find it does a pretty good job overall.
Some extensions like Resharper or Visual Assist offer their own code completion or other similar features (like Suggestion List for Visual Assist).
I know it's been ages since I asked this question but I found the next best thing to do this. What I would suggest is to use VsVim extension and to use Vim's anyword completion; however, in order for this work, what must be resolved is the keyboard shortcuts that conflict:
Go to "Tools options" in Visual Studio.
Then go to VsVim category(alternatively you can search "VsVim" and
should bring the options) and click keyboard.
As far as I know vim deals with this type of completion with these keys
CTRL+P and CTRL+N so what we do is to let Visual Studio give up
these keybindings and let VsVim deal with it by Selecting from the drop
down of the keys(CTRL+P and CTRL+N) and let it be "Handled by VsVim".
I hope this has helped someone out.

Visual Studio: Shortcut to close window not working

I changed the shortcut to close a window to Ctrl+W and to close all windows to Ctrl+Shift+W. Close all windows works fine, but Ctrl+W selects the word currently under the cursor but does not close the window.
When I right-click a tab it say Ctrl+W is the shortcut to close it (And also Ctrl+S to save and Ctrl+Shift+W to close all). Why is only the close window shortcut not working?
In Visual Studio (VS 2015 in my case but it's similar down to VS 2010 at least) keyboard shortcuts may have a different meaning depending on the context in which they are executed.
Click Tools / Options / Environment / Keyboard to look up or define shortcuts (you already did that probably). What I called "context" is selected in the combobox labelled "Use new shortcut in:". Most likely you defined the shortcut in "Global" but you want it to work in "Text Editor". In the latter Ctrl+W selects the current word.
Redefine Ctrl+W for "Text Editor" and you should be fine.
I am using Visual Studio 2017 & Visual Studio 2019 and tried the answer from #TobiMcNamobi but it didn't work for me. After few such tries I got it work with below steps.
You should add it as Global shourtcut otherwise it will not work for Designer views.
Add CTRL+W as a Global shortcut for Window.CloseDocumentWindow
Remove the CTRL+W shortcut for Edit.SelectCurrentWord
In Visual Studio 2019 it is Ctrl-F4 by default to CloseDocumentWindow. The action is Window.CloseDocumentWindow. I know this is old but the accepted answer has you change the short-cut key instead. I would rather use the default option.
Tools -> Options -> Environment -> Keyboard
If you're ever unsure go to the path above and you will see the image above then you can click inside the box "Press shortcut key" at the bottom of the form and type the short cut key you're interested in and it will tell you if it is used and what it is currently used for.
You can also reference the docs
https://learn.microsoft.com/en-us/visualstudio/ide/default-keyboard-shortcuts-in-visual-studio?view=vs-2019
2021: For Visual Studio 2019:
See: https://gist.github.com/jpoehls/2030795#gistcomment-2335647
In my case, I had to existing assignments that I had to remove. Thereafter, I could use the hotkey.
In my case, the tabs were not closing because I am using Vim extension. I had to add the following lines to Vim settings:
"vim.handleKeys": {
"<C-w>": false
}
Just press Ctrl + , or Command + , for Mac users, search for Vim and go into Edit in settings.json as the following picture shows:
Screenshot
For Visual Studio 2022, make sure you also remove Ctrl+W from selectCurrentWord command.
In my VS Pro 2019, on Tools / Options / Environment / Keyboard, the first line offers using a premade keyboard mapping scheme, with a drop-down option for VSCode keyborad mapping theme.
I picked it and it seems to have adopted the keyboard shortcuts I was used to from working on VSCode, Ctrl+W included.
For those using linux with VSCode v1.56.2,
File --> Preferences --> Keyboard Shortcuts.
Search for View:Close Editor and as mentioned above, remove any keybinding that has the keybinding you want.

Shortcut for expanding IEnumerable Results View in Visual Studio debugging

When I'm debugging in Visual Studio (up to 2012) and hovering over a variable to explore all the properties, I explicitly need to press the Expanding the Results View will enumerate the IEnumerable button on IEnumerables.
As I am inherintly lazy a superefficient coder I was hoping there was some kind of shortcut, like double clicking or a hotkey. Is there any?
Update
#Alex Essilfie has created a suggestion on Uservoice. Follow this link to vote it up before the VS2013 release!
You could install a commercial extension I created for Visual Studio called OzCode, which enhances the VS debugging experience and replaces Visual Studio's UI for the on-hover DataTip, and since I'm also a super-lazy coder, I decided not to require the user to click a separate button before he/she can expand the "Results View" node.
Another solution, which is not really more efficient but does not require using the mouse, is to hit Shift+F9 (to pop up the QuickWatch window) and then type in "cats,results" and then hit enter.
There may not be a default keyboard shortcut for this in VS, but if you go to Tools/Options then Environment/Keyboard, you can add a shortcut of your own for any command - if you can figure out which one you need...

How to enable C-U/C-D with ReSharper installed

I have recently installed VsVim and ReSharper into VS 2010. The ReSharper hotkeys seem to override those of VsVim.
Is there a way to make VsVim commands higher priority than those of ReSharper?
More specifically, I would like Ctrl+U and Ctrl+D to work like in Vim.
When I press Ctrl+D the shortcut conflict window appears and there doesn't seem to be a PgDown option.
On the window in the image select Visual Studio. Then open a text file (.cs, .cshtml, whatever) and in the bottom right of the window is an "options" button to the far right of the vsVim cmd line you type into. Click the options button and you will get a list. It will say "Ctrl_D handle with" and your options will be Visual Studio or vsVim; just switch it. You can come back and undo it later. I have VS2010, Resharper and vsVim and don't have the issue, but it may also be a .vimrc config setting where you need to disable the msvim options.
You need to tell ReSharper that you want Visual Studio to handle those keyboard shortcuts instead of ReSharper (in the window you show in your question), and tell VsVim that you want it to handle them instead of Visual Studio.
In up-to-date versions of VsVim, you do this by going to Tools -> Options -> VsVim -> Keyboard (by "Tools" I mean the menu in the Visual Studio menu bar). There you can configure what you want VsVim to handle. There used to be an "Options" button at the end of Vim's status bar, as John's answer says, but that is no longer true.
I have CTRL-d and CTRL-u set up to scroll in my VsVim configuration so I can vouch for it working.

Resources