I can't believe I'm asking this. I have resharper 9.0 and visual studio 2013 community. My extend selection hotkey is supposed to be ctrl alt right but that doesn't work at all. I can use ctrl-w instead but ctrl-shift-w does not work for shrinking. I'd like to remap the bindings but I cant even find the resharper extend selection mapping in my keyboard options. I am able to find the shrink option and it's set to ctrl-alt-left (doesn't work). Tried changing it to alt-shift-down but STILL doesn't work. What am I doing wrong here?
The extend selection command is ReSharper.ReSharper_SelectEmbracingConstruct, and the shrink selection is ReSharper.ReSharper_ShrinkSelection (Yay consistency!) You can remap them in the Tools → Options → Keyboard dialog.
Or, you can reset keyboard shortcuts to default ReSharper settings by going to Tools → Options → Keyboard and hitting reset, then going to ReSharper → Options → Keyboard & Menus and hitting "Apply Scheme".
Related
I usually access Visual Studio's Find in Files feature with Ctrl-Shift-F, type in what I'm after and press enter.
Everything is working, I can type what I want to find, Ctrl-A will select all text, arrow keys will navigate within the Find What text control only the enter key press does nothing. The dialog still has focus, just nothing happens.
The accelerator keys that are marked on the various buttons also do not do what I expect. Alt-P will open the Project menu, Alt-F the File menu, Alt-A nothing. When the Find in Files dialog is focussed I expect the Find Previous, Find Next or Find All actions to be performed.
The tab key also does not change focus from one control to another while in that dialog.
The escape key will kill the focus in that dialog and return focus back to the file that I have open in the text editor as expected.
I have tried using the Reset button under Tools -> Options -> Environment -> Keyboard to no avail.
I am using Visual Studio Ultimate 2013 Update 4 on Windows 7 x64.
If you're using Resharper, after applying R# keyboard scheme, it will add it's keyboard shortcuts. For example, it adds Alf+F shortcut in Text Editor scope.
Setting your keyboard shortcut in Global scope is not enough if same keyboard shortcut is set by R# for Text Editor.
To override R# shortcut in Global scope, make sure you delete R# shortcut setting in VS keyboard settings modal dialog.
Rarely, strange keyboard shortcut behavior could be also caused by non-US keyboard setting. If you are using non-English keyboard set in Windows Control Panel settings, try this solution:
Set keyboard layout to US
Reset keyboard shortcuts in VS under Tools -> Options -> Environment -> Keyboard
Assign your shortcuts (e.g. Alt-F)
Set keyboard to your local layout
I love the Productivity Power Tools extension for visual studio, however it has added the Ctrl+Click "Go To Definition" functionality, which is great and all, but my workflow makes me use the functionality when I don't want it.
When I want to copy something, I start marking some text, still holding down the mouse button, hold down Ctrl + C and then release the mouse button. The tool acknowledges this as a Go To Definition click, and I usually end up in the definition of String or whatever. I know I could just release the Ctrl button prior to the mouse-button; however, I have a hard time reconditioning myself from a habit I have had since forever.
Is there a way to remap the Ctrl + Click Go To Definition functionality, say, to Ctrl+Shift+Click? I know I can deactivate it by going to "Tools>Options>Productivity Power Tools>All Extensions"; however, I don't want to lose the functionality just make it work as I want it.
Edits:
This might be a ReSharper issue.
This post discusses something similar
Try going to ReSharper | Options -> Environment | Search & Navigation and turning off Go to declaration on <Control + Left click> in editor.
I don't have ReSharper. But I was able to turn this off in Visual Studio 2012. I found it in Tools - Options - Productivity Power Tools - Ctrl+Click Go To Definition.
Try menu Tools → Options → Productivity Power Tools (left menu) → Turn it off where it says Ctrl + Click Go To Definition on your right side.
There were Ctrl+E+C (comment) and Ctrl+E+U (uncomment) in older versions, or Ctrl+K+C and Ctrl+K+U.
But in VS 2012, I can't see key shortcuts:
How to enable those shortcuts?
Keyboard accelerators are configurable. You can find out which keyboard accelerators are bound to a command in Tools -> Options on the Environment -> Keyboard page.
These commands are named Edit.CommentSelection and Edit.UncommentSelection.
(With my settings, these are bound to Ctrl+K, Ctrl+C and Ctrl+K, Ctrl+U. I would guess that these are the defaults, at least in the C++ defaults, but I don't know for sure. The best way to find out is to check your settings.)
You can also add the toolbar in Visual Studio to have the buttons available.
View > Toolbars > Text Editor
Use the keys CtrlK,C to comment out the line and CtrlK,U to uncomment the line.
From your screenshot it appears you have ReSharper installed.
Depending on the key binding options you chose when you installed it, some of your standard shortcuts may now be redirected to ReSharper commands. It's worth checking, for example Ctrl+E, C is used by R# for the code cleanup dialog.
This is how I did it,
Menu Tools → Options on the Environment → Keyboard window
One can alter the default shortcuts following the below steps
Select Edit.CommentSelection in the listbox
Click on "Remove" button
Select "Text Editor" option in the dropdown under "Use new shortcut in:"
Press your own shortcut in the textbox under "Press shortcut keys:"
Example: Pressing Ctrl+E and then C will give you Ctrl+E, C
Click on "Assign" button
Repeat the same for Edit.UnCommentSelection (Ctrl+E, U)
I went to menu: Tools → Options.
Environment → Keyboard.
Show command containing and searched: comment
I changed Edit.CommentSelection and assigned Ctrl+/ for commenting.
And I left Ctrl+K then U for the Edit.UncommentSelection.
These could be tweaked to the user's preference as to what key they would prefer for commenting/uncommenting.
"commentLine" is the name of function you are looking for. This function coment and uncoment with the same keybinding
Shift + alt + a
the command palette is great for finding shortcut keys.
I've been diligently memorizing VS 2010 shortcuts based on the cheatsheats on Scott Guthries blog.
The shortcuts in the cheatsheet for WIndows dont match my setup e.g. Ctrl W,C is the cheatsheet shortcut to open the class viewer but mine is Ctrl + SHift, C. Maybe this is because my 08 settings got picked up at some point.
I've changed the shortcuts for viewing windows to match the cheat sheet (Ctrl + W,...) however most of the time Ctrl+W,... isn't working for me, whereas the previously defined shortcuts still work. If I go into the keyboard mappings I can see the shortcuts under global are Ctrl+W.
Anyone got any ideas?
Try going to Tools -> Options -> General -> Keyboard, focus the textbox labelled "Press shortcut keys" and pressing Ctrl+W. The dropdown list beneath it will show all corresponding actions. Action mappings are contextual -- they depend on what has the focus. Furthermore, 'Global' actions only apply if a more localised mapping does not exist. Check for anything applied to 'Text Editor'. If it exists and you don't want it, remove it by digging the action out in the 'Show commands containing' textbox above and clicking 'Remove'.
Also, do you have ReSharper installed? I love R#, but it uses Ctrl+W so the series of shortcuts you're referring to aren't available without being remapped or changing the R# keystroke (which I wouldn't personally, as I use it all the time.)
When I have a file open in visual studio/sql server management studio and have it split in to two panes, I'd like to be able to switch between the panes without having to reach for the mouse. Does anyone know if a shortcut key exists for this?
F6 is your friend.
I think you can assign this by going to Tools -> Options -> Keyboard and searching for SplitPane. You should be able to assign shortcut keys for the following values:
Window.NextSplitPane
Window.PreviousSplitPane
CTRL+F6 will cycle through your files and across panes.
In SSMS: right-click toolbars, customize. Under categories, select Window, then under Commands select "Next Split Pane". Drag to toolbar. Right-click and change name to "Next Split P&ane". You can now use alt-a to change split pane.
On Microsoft SQL Server Management Studio (SSMS) 2012, I figured out that it is the combination of Ctrl+Shift+UpArrow(or DownArrow). :-)
This was not easy for me for some reason. This method finally worked (similar to Steve Dignan's answer above but I don't have enough rep to comment yet).
In VS 2012, Tools, Options, Environment, Keyboard.
"Apply the following additional keyboard scheme" set to "Visual C# 2005".
"Use new shortcut in" set to 'Global'.
Enter "splitpane" in "Show commands containing" to get only the 2 desired commands.
Select the first one and remove any shortcuts already assigned.
Click inside the "Press shortcut keys" box and use "Ctrl + Alt + Up Arrow" for prev and down arrow for next.
If either of those shortcut chords are currently used by something else, you may need to search on that command and remove it from there. Then come back to the split pane commands and Assign.
Don't forget to close VS before you open another instance of it.
For Visual Studio 2010 (maybe others as well) F6 will work to jump between split panes if Tools -> Options -> Keyboard does not use the Visual C# 2005 keyboard layout additionally (which was the case for me for I-don't-know-why reasons - maybe I said yes to an installer/first-start question a long time ago).
Of course you will no longer be able to build your project with F6 afterwards. ;-)
For Visual Studio 2012: Tools -> Options -> Keyboard -> search by Window.Split and add a new shortcut.