Friday, June 24, 2011

DevTnT v2.1 – Visual Studio: Delete Line(s) with Ctrl+L

If you want to delete the current line or a block of lines in Visual Studio you don’t have to select the line(s) and press DEL. But there’s another possibility you may want to consider:

Use Ctrl+L do delete the current line or all the lines touched by the current selection.

Warnings

Easy as it is, there are two warnings for you:

Warning 1: Ctrl+L is Cut

Actually, Ctrl+L does a cut operation, so it will overwrite the content of your clipboard.

Warning 2: Mind the last line

If you have selected multiple lines and your selection ends with the first column of a line, that line will be deleted as well in its entirety although you may have no visual clue that it is part of the selection!

Especially, when you select your lines by holding the shift key and moving the cursor down, there might be always a line more involved than you might expect:

Whole line selection

This will cut the line with the closing brace as well (what you might not want to). Instead, if you just select until the end of the line that will not happen. Mind the length of the selection-rectangle and the position of the caret in contrast to the previous example:

Selection of line just to its end

1 comment:

  1. Each of the promotions come with a devoted bonus code that you could take from the table beneath. Later within the article, we speak extra about each supply and the way they work. However, 온라인카지노 no website is ideal and one downside is that both e-wallet PayPal and cryptocurrency Bitcoin usually are not supported on the website. If you need one of many prime Bitcoin casinos then the cryptocurrency and games by dozens of software builders are yours at Bitstarz Casino. Live Roulette - Roulette games are in style on the stay vendor part and our review revealed games like American and European Roulette, Lightning Roulette, and extra.

    ReplyDelete