keyboard shortcut for viewing/applying available refactorings - c#

I just installed CodeRush Express and was wondering is there any keyboard shortcut for viewing/applying available refactorings. Currently I have to click on the small underline/underscore to get the available refactorings.

The general shortcut for that dropdown in Ctrl + . (control + full stop).
Works for VS even when CodeRush is not installed.
Also for CodeRush is Ctrl + ' (Control + apostrophe) which will either show the refactoring list (without having to wait for the underscore to appear), or apply the refactoring if there is only one available.
EDIT: The shortcut for CodeRush is Ctrl + ' for UK keyboards, but (I think) Ctrl + ` for US keyboards.

Try hitting Ctrl+Shift+Alt+O, which will bring up the options dialog for CodeRush Express, where you can find the keyboard shortcuts.
If I'm not mistaken, the CR Express shortcut for refactoring defaults to the backtick key on english keyboards.
Personally I have bound it to Alt+Enter.

Related

Disable "Break Mode" page in VS2015

Recently migrated from VS2010 to 2015. Now when I pause a running app to work on it, I get this very annoying "Break Mode" page with "The application is in break mode". Well, no shoot Sherlock, I pressed pause. I know its in break mode. The page is annoying and takes me away from the code I was going to work on completely unnecessarily.
I didn't get this annoying page in 2010. I may have some setting switched back then on 2010 but too long to remember.
Is there a way to disable this silly break mode page in VS2015?
The best solution I've found so far is to drag the "Break Mode" tab to the bottom of your screen (so it is attached like a toolbar window) and make it as small as possible. Then when you pause and get this screen it at least doesn't cover your existing view.
There is a free extension to resolve this issue: Disable No Source Available Tab available for from the VS Market Place.
This small extension will prevent the tool window with title "No Source Available" from appearing in Visual Studio, and preserve the focus on the currently active tab.
Under Tools → Options → Debugging → CHECK "Use Managed Compatibility Mode"
I had this annoying problem, too and did not realise, that i turned the Exception Settings to "Break on all exceptions". Then there where some Exceptions in external Code, where the debugger stopped, but I could not see the code, as it was in a Framework. Pretty annoying.
To reset Exception Settings in VS2017:
ctrl+al+e -> right click on the opening window -> reset to defaults
Maybe this helps someone =)
Dont use this primarily. Use atchoum's solution. its the BEST.
Another option:
I like to use the keyboard instead of the mouse, so I invoke a pause with CTRL + ALT + BREAK(or you can click pause)
regardless this causes the annoying "Break mode" window to appear
When it comes up and assuming you still have the CTRL + ALT + BREAK keys held down- Just release the ALT and BREAK keys and hit the F4 key
This will close the annoying break mode window and take you to the page and spot your had the cursor on before you pressed the break combination of CTRL + ALT + BREAK.
So... in one foul swoop press
CTRL + ALT + BREAK (to enter break mode) and then
CTRL + F4 (to close the stupid "break mode" window and place the cursor where you were before you hit CTRL + ALT + BREAK )
I was having same problem and was tired of searching for a solution but, in end, I found out there was one error in my code at specific form; after changing that code I didn't got any break mode type error.
CODE WHEN ERROR (Break mode) OCCURRED
Private Sub TextBox1_TextChanged(sender As Object, e As KeyPressEventArgs) Handles TextBox1.TextChanged
CODE WHEN ERROR (Break mode) DIDN'T OCCUR
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
May be this can help so please check where and when your code triggers something.
To Disable "Break Mode" page go to:
Tools --> Options --> Debugging --> General
Uncheck the checkbox of "Enable Just My Code"

How do I jump between XML doc comments in C#?

OK, this is a silly question, but when using Visual Studio, if I am writing XML doc comments in Visual Basic, I can use the tab key to switch between fields (e.g. Summary to Param to Returns). In C#, however, hitting the Tab key inserts a Tab, so I have to click on the individual fields to navigate to them (or use the arrow keys). This makes what should have been a simple process tedious and time-consuming.
Anybody know if there is a default keyboard shortcut I can use, or if there is a specific command I can map to an unused keyboard shortcut? I am using Visual Studio 2010, with ReSharper 6.1. Did some searching in the SO archives, but either nobody else has this problem, or I don't know the right keywords to ask (the latter is much more likely). Thanks in advance!
EDIT: I should clarify, a bit. The tabbing behavior in VB is native to Visual Studio 2010; the ReSharper install is fairly recent (after I switched to C#), and I wanted to mention it in case someone might know whether ReSharper had added their own navigation shortcuts (as they have tons) for this. Thanks again!
Resharper does have the possibility for structural navigation. Normally you can use the Tab or Shift+Tab Shortcut to the next or previous code element.
If your cursor is in a code element (i.e. not in the whitespace region before a code line) the Tab Key shouldn't insert a tab but navigate to the next section.
Configuration of the structural navigation can be done in Environment|Editor|Editor Behaviour.
If it's still not working as described I'd try to reset the settings (especially those for Resharper) and check wether Resharper is installed properly.
I might be misunderstanding the question, but maybe it sounds like you can just reset your user settings? http://msdn.microsoft.com/en-us/library/ms247075%28v=vs.100%29.aspx ? Or just run a devenv / resetuserdata . Do that, and when you start up visual studio, maybe choose the 'general' settings rather than the C# or vb.net specific ones?

The most common shortcut in Textmate doesn't work?

The shortcut for jumping to the beginning or end of a line of code with ⌘ + → or ⌘ + ← does not work. I just get a MaC OS X system beep.
I believe this shortcut is universal to the Max OS X platform, and not specifically TextMate, and it and it does work everywhere else (TextEdit, StackOverflow, etc.).
Why would TextMate conflict with it, and not work?
It does work on my other Mac in TextMate. Is there a configuration I can change somewhere? I tried reinstalling TextMate.
Update
I was on Textmate 1.8, and upgraded to 1.9 .
I noticed this in the Release notes :
[FIXED] Add local key bindings for command + arrows (as there are no defaults in Snow Leopard) - ticket 0FDE7076.
Now when I do ⌘ + ← It closes the application, and goes to whatever app is also being used by finder.
When I do ⌘ + → it works as expected.
Maybe you have a bundle item that's interfering? ⌘-Arrow does work as expected in TextMate.
I haven't heard of that shortcut, and no idea why it's not working.
I use the emacs combos that work in most Mac apps: Ctrl-A to jump to the beginning of a line and Ctrl-E to jump to the end.
Ctrl-D (forward delete), Ctrl-L (center current line) and Ctrl-T (transpose two chars) are also handy.
I finally found this! Turns out textmate doesn't work with Snow Leopard key bindings.
http://ticket.macromates.com/show?ticket_id=0FDE7076
Strange right? The files included in this link should address the problem.
Unlike many programs, short-cut keys are not defined in the preferences but it in the bundles that are loaded when the application starts.
TextMate has a bunch of places it looks for bundles and add-ons so you might have to hunt around to find the differences between the two apps. In general terms you should look in ~/Library/Application Support/TextMate and /Library/Application Support/TextMate to see what is set.
You should be able to copy the contents of the working bundle set over to the non-working computer to resolve the problem. Be sure to make a back-up of that directory first just in case you make it even worse by mistake.
TextMate doesn't use Cocoa for its main window text box, but it does implement most Cocoa shortcuts, including ⌘ + → for jumping to the end of the line.
As discussed, you most likely have a bundle that's binding that command. However, because it's TextMate, and TextMate is awesome, there is a simple and direct method to find out what bundle item that is.
Bundles->Select Bundle Item..., then click the magnifying glass and switch to Key Equivalent. Type ⌘ + → and it will show you what bundle item you're getting. This is context dependent, so make sure your cursor is in the scope where you're having problems.
If you don't see a bundle item show up, then it means some other program on your computer is eating ⌘ + →.

Visual Studio F6 stopped working. It no longer builds the project

I'm using VS2008, been using it for quite some time now, and since I hate using the mouse while developing, I'm always using F6 to build the solution, or Shift+F6 to build the current project. What's weird though is for some strange reason, it simply stopped working over the last few days. In fact, when I pull down the Build menu, next to "Build MyProject" there's no longer a "Shift+F6" shortcut there on the menu?!? Anyone ever experienced this? Is there a setting I need to change?
You can change keyboard bindings in the Tools->Options dialog. It's under Environment->Keyboard.
You can reset the binding here, and also check what might have stolen it by checking what's currently bound to those keys.
If you recently installed any add-ins, they're known to set (sometimes unwanted) keyboard shortcuts.
Your Keyboard Mapping Scheme has changed.
Go to Tools -> Options. In Environments->Keyboard in the dropdown for "Apply the following additional mapping scheme" select "Visual C# 2005"
Have you tried : Tools -> Options -> Environment -> Keyboard
All the keyboard shortcuts have been shown there.
I'll add the proverbial "Is it plugged into the wall" question:
Do you have a fancy keyboard that replaces function keys with other things toggled incorrectly?
VMWare stole my Shift + F6. Maybe that's your prob?
I fixed this by going to going to tool-options-environment-keyboard just like the other suggestions but I clicked "Reset" instead to restore the proper short cuts.
Resharper was annoying about this.
I had to set BuildSolution to f6
then remove F6 from Resharper_Move
Just in case this bites anyone else: Parallels Desktop for OS X grabs F6 and uses it for "Show and hide Parallels Desktop". It can be disabled in Preferences -> OS X System Shortcuts
I know this question already has an answer but it is good to have this here for future reference:
On the Solution properties page, Configuration Properties -> Configuration, the list of projects will be displayed and the last column "Build" will have checkboxes, one for each project.
If they are all unchecked, you will press F6 but nothing will happen. Check the projects you want to build, on that case and you are now good to hit F6.

What's the default intellisense shortcut in vs2008?

I'd like to open the intelligence window without typing a character and then backspacing it. I can't seem to remember the shortcut for this. What is it?
Ctrl + Space for normal Intellisense, and Ctrl + Shift + Space for parameter Intellisense (e.g. to see what overloads are available in a method call which you've actually already filled in). I find the latter very handy :)
Ctrl + Space?
Also, go to Tools -> Options -> Environment -> Keyboard or Default Keyboard Shortcuts in Visual Studio, you can then search for commands and see what is assigned to that (and remap).
Ctrl + Space
If you have installed MSG Plus, then the problem is messenger lock keys, try to change them in msg plus and Intellisense will work again. Good Luck!

Categories