c# - Format code shortcut for Visual Studio? -


in eclipse there shortcut ctrl+shift+f re-indents code , fixes comments , blank lines. there equivalent visual studio 2010?

visual studio c# key bindings

to answer specific question, in c# using c# keyboard mapping scheme, use these hotkeys default:

ctrl+e, ctrl+d format entire document.

ctrl+e, ctrl+f format selection.

you can change these in tools > options > environment -> keyboard (either selecting different "keyboard mapping scheme", or binding individual keys commands "edit.formatdocument" , "edit.formatselection").

if have not chosen use c# keyboard mapping scheme, you may find key shortcuts different. example, if not using c# bindings, keys be:

ctrl + k + d (entire document)

ctrl + k + f (selection only)

to find out key bindings apply in your copy of visual studio, in edit > advanced menu - keys displayed right of menu items, it's easy discover on system.


(please not edit answer change key bindings above your system has!)


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -