Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010: Why aren't key combinations available?

I am trying to use VS 2010 for writing C. Frequently, I try to use a hotkey combination, and I get an error message of the form:

The key combination (key, key) is bound to command (Command) which is not currently available.

Why is this? Examples include CTRL + R, R for Rename and CTRL + K, CTRL + D for Format Document.

I am trying these commands with my cursor in the code editing window.

I find that this works in 2008 C# but not 2010 C/C++.

like image 986
Nick Heiner Avatar asked Feb 01 '10 18:02

Nick Heiner


2 Answers

As 020Z28 says, the commands aren't supported in the C++ text editor. The workaround for Format Document is to Select All then Format Selection: Ctrl A, Ctrl K, Ctrl F.

like image 182
minnow Avatar answered Sep 30 '22 14:09

minnow


The C++ text editor does not implement those two commands. If they work in 2008, it's only because you have an extension installed that adds support for those features.

Edit: The OP currently says "for writing C", just in case the question later changes to "for writing C#."

If the OP actually means C#, then the error is occurring because you are editing a document that is not part of a project/solution you currently have open, or the file has the Build Action set to None.

like image 30
Sam Harwell Avatar answered Sep 30 '22 15:09

Sam Harwell