ammb2a
Last Updated: February 25, 2016
·
1.044K
· keboo

Visual Studio clipboard gotcha

I am a huge fan of ReSharper’s Multiple Entries Clipboard. However, recently I have been struggling with a weird issue where the clipboard always seemed to get entries that contained a bunch of empty lines. This issue was especially common when I was moving code around and would delete extra empty lines.

I favor keeping my fingers on the keyboard and will often highlight text with the Shift+Arrow Key functionality rather then using the mouse. It is not uncommon for me to do this with empty lines then press the Delete key to remove the selection.

As it turns out, Visual Studio uses Shift+Delete is a shortcut key for Cut (in addition to Ctrl+X). As I tend to fat finger keys, quickly switching from Shift+Arrow Key (for highlight) to pressing the Delete key, I was constantly pressing Shift+Delete. Granted it removed my selection as I was expecting but it was also putting that empty text only my clipboard (a non-desired result).

See http://msdn.microsoft.com/en-us/library/0hbf628s(VS.90).aspx for other default shortcut keys.

Source: http://dotnetgeek.tumblr.com/post/3631478470/visual-studio-clipboard-gotcha

Say Thanks
Respond

3 Responses
Add your response

106
526113 624580858385 1044550908 n

Actually, I recall from some point in my past that Shift+Delete and Shift+Insert are actually alternative Windows shortcuts for cut and paste.

over 1 year ago ·
116

@adamhewitt627 Yes you are correct, this is a old-school windows method for the cut operation.

over 1 year ago ·
16229
2ad736b6060385dcc24177fa172ee66d

Ctrl+Shift+L is the shortcut for removing the current line without placing it on the clipboard (using C# bindings).

over 1 year ago ·