views:

650

answers:

4

Is there a way to issue a key command to properly format an entire file in VS2008 with CodeRush Express?

A: 

I just use built-in Visual Studio formatting command: Ctrl+A, Alt+F8 :D

Igor Zevaka
+7  A: 

Use Ctrl+K+Ctrl+D to format document keystroke

Use Ctrl+K+Ctrl+F to format selection keystroke

It's also possible to set your own keystrokes by opening Options... dialog (select Tools->Options from the menu). In Options dialog select Environment->Keyboard form the tree and set your own shortcuts for Edit.FormatDocument.

Vadim
didn't work for me
RCIX
Or rather "Ctrl+K, D".
Pavel Minaev
That is, press "Ctrl+K", release it, and then press "Ctrl+D".
Pavel Minaev
Nope, didn't work... :(
RCIX
@RCIX When you select Edit->Advanced from menu what keystrokes do you see for Format Document?
Vadim
Stealing my answer, eh? :-P
phsr
Ctrl+K, Ctrl+D but when i execute that it does nothing...
RCIX
And on top of that when i use snippets (like pressing tab twice after typing if) i get all screwed up indenting, and osme CR refactorings get that too
RCIX
This looks more like CodeRush problem to me.
Pavel Minaev
Hmm...
RCIX
It should be noted that Ctrl+K, D is a VS shortcut, and not a CodeRush command
isc_fausto
+3  A: 
[Ctrl]+[K],[Ctrl]+[D]

This question with answers has a lot of handy tips.

Tomas Lycken
+1  A: 

You could always go to Tools -> Options -> Keyboard and give the Edit.FormatDocument a new shortcut.

Update You can also see what the Shortcuts mapped to this command are this way.

phsr
It looks like mentioned about Edit.FormatDocment before last edit of my question. I honestly didn't see your answer. But you definitely deserve +1 but being first.
Vadim
I was just giving you a hard time, no worries
phsr