Thursday, March 28, 2013

Tip 1.12: How to use the Undo stack on the standard toolbar

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

Sara Ford's Blog



Instead of having to press Ctrl+Z or Ctrl+Y multiple times to undo or redo multiple commands, you can drop down the Undo or Redo button and, starting from the last action, select how many consecutive additional actions you want to undo or redo.



Just make sure the cursor is in a text editor to enable these buttons.

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

Sunday, March 24, 2013

Tip 1.11: You can use a keyboard shortcut to uppercase or lowercase a word in the editor

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

Sara Ford's Blog



Once again, this tip illustrates that you can save time by using a keyboard shortcut versus having to type out your changes manually.
  • Press Ctrl+Shift+U to make the current character or selected characters uppercase.
  • Press Ctrl+U to make the current character or selected characters lowercase.




Sara Aside

She has to be honest here and say she had to ask around the Visual Studio building to find out under what conditions these commands would be useful. One scenario is where the Caps Lock key is bound to be a control key. For example, you type a word, then press Ctrl+Shift+Left Arrow to select, then use Ctrl+Shift+U to uppercase (instead of having to hold the Shift key down to type the entire word). Or maybe IntelliSense has made her lazy. =D


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

Saturday, March 23, 2013

Tip 1.10: How to transpose characters, words, and lines in the editor

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

Sara Ford's Blog



You can use three commands for transposing or swapping text in the editor, namely:
  • Press Ctrl+T to transpose a character.
  • Press Ctrl+Shift+T to transpose a word.
  • Press Alt+Shift+T to transpose a line.
In the following example (where the cursor is placed before the "is" on the commented line "now is the time"), she'll apply the three commands to illustrate how text is swapped.



Pressing Ctrl+T swaps "i" and the previous space, creating "// nowi s the time". Pressing Ctrl+Shift+T swaps "is" and "the", creating "// now the is time". Pressing Alt+Shift+T swaps the current line with the line below it.

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