Saturday, November 30, 2013

Tip 1.7: How to delete horizontal white space at the beginning of a line

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

Sara Ford's Blog



Sara Aside

She always thought that "white space" was one word, but according to the Visual Studio UI, it is apparently two words. For this tip, she'll let the UI win and call it "white space."


On the Edit–Advanced menu, you'll find the Delete Horizontal White Space command bound to Ctrl+K, Ctrl+^.



To use, put the cursor anywhere in the white space that precedes the line and press Ctrl+K, Ctrl+^. You can also select multiple lines and delete the white space at the beginning of each line.



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

Friday, November 29, 2013

Tip 1.6: You can use Ctrl+L to cut the current line and Ctrl+Shift+L to delete the current line

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

Sara Ford's Blog



Ctrl+L cuts the current line, including the end-of-line character (EOL). The command is Edit.LineCut. Ctrl+Shift+L deletes the current line, including the EOL. The command is Edit.LineDelete. Here's an example of Ctrl+L being used. In this example, you'll see the cursor before the Console.WriteLine() call.



And after you hit Ctrl+L, the line disappears.



But let's continue on with a bonus tip . . . Shift+Delete cuts the current line, including the EOL, if nothing is selected on the current line. If text is selected, Shift+Delete cuts just that text.

Happy Programming! =)
Posted by Nils-Holger at 12:12 PM with 787 comments.

Thursday, November 28, 2013

Tip 1.5: You can use Ctrl+Delete to delete the next word and Ctrl+Backspace to delete the preceding word

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

Sara Ford's Blog



Sara Aside

Many of her "Tip of the Day" ideas come from looking through her old test cases. The Ctrl+Delete test case caught her eye because she had completely forgotten about this keyboard shortcut!


Ctrl+Delete deletes the next word the editor finds. The command is Edit.WordDeleteToEnd. Ctrl+Backspace deletes the previous word. The command is Edit.WordDeleteToStart.



Happy Programming!
Posted by Nils-Holger at 12:01 PM with 438 comments.