Tuesday, September 30, 2014

Tip 2.22: How to reuse the same editor window when opening files

"Visual Studio Tips, 251 ways to improve your Productivity" in Visual Studio, courtesy of 'Sara Ford'

Sara Ford's Blog



Go to Tools–Options–Environment–Documents, and check the Reuse Current Document Window, If Saved option to give this tip a try.



If the current document window is dirty (meaning you've made a modification but haven't saved it yet), the next document opens in its own document window. However, if the current document is saved, the new document just opens over it.

She tried using this from time to time when she owned testing it, but it wasn't for her.

Happy Programming! =)
Posted by Nils-Holger at 1:30 PM with 442 comments.

Monday, September 29, 2014

Tip 2.21: How to get syntax highlighting for a given file extension

"Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



On the Tools–Options–Text Editor–File Extension page, you can map a file extension to one of the included editors.



And after mapping the .Nils extension to a C# editor, we now get syntax highlighting for the file.



There is also an option to map files without extensions to a specific editor.



Happy Programming! =)
Posted by Nils-Holger at 1:36 PM with 660 comments.

Sunday, September 28, 2014

Tip 2.20: What does Visual Studio do to autorecover files in the case of an unexpected shutdown?

Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio", courtesy of 'Sara Ford'

Sara Ford's Blog



People on the testing team used to tease the tester who owned the AutoRecover feature that every time there was a power failure in the building (because of a storm or other such event), he was standing near some big red switch in the off position with a grin on his face so that everyone in the building could test his features for him.


Under Tools–Options–Environment, you'll find the AutoRecover page.



Note that you can opt out of the AutoRecover feature by unchecking the Save AutoRecover Information Every check box.

The rest of the page is self-explanatory, but did you know where Visual Studio saves these autorecovered files? They are saved in \My Documents\Visual Studio \Backup Files\.



In case you (hopefully) have never seen the AutoRecover dialog box, here's what it looks like. It'll pop up the next time you launch Visual Studio after an unexpected shutdown. You have the options to either use the backup files or ignore them.



Happy Programming! =)
Posted by Nils-Holger at 10:41 AM with 441 comments.