Triplell89
Triplell89

Reputation: 293

Visual Studio Shortcut to select an entire line

I often find myself selecting entire lines in visual studio usually for correcting indents.

Using home->shift+end doesn't select the whitespace at the beginning of the line, so pressing tab will replace the selection with a tab, instead of indenting.

Is there a hotkey to select the entire line in visual studio?

Upvotes: 3

Views: 5069

Answers (1)

Kevin DiTraglia
Kevin DiTraglia

Reputation: 26078

hit home twice before you hit shift + end to select the whole line plus tabs

Or my preferred method is start from the end and type

end -> shift+home+home

As for correcting tabs, if you select more than 1 line it will tab out all lines, but selecting only 1 line will replace that line with a tab (whether you select the current tabs along with it or not). To tab a single line don't highlight the line at all:

home + tab

Upvotes: 8

Related Questions