Friday, January 21, 2011

Can VS be configured to automatically remove blank line(s) after text is cut?

Is there a way (or shortcut) to tell VS 2008 that it cuts a line like this:

Before:

Some Text here
This gets cut
Some Code there

After:

Some Text here

Some Code there

What I want:

Some Text here
Some Code there

PS: I don't want to select the whole line or something like this... only the text I want to cut.

  • Unless I misunderstood you:
    Just place cursor on the line you want to cut (no selection) and press Ctrl + x. That cuts the line (leaving no blanks) and puts the text in the Clipboard. (tested in MS VC# 2008 Express with no additional settings I'm aware of)

    Is that what you want?

  • Don't select anything, just hit ctrl-x when the cursor is on the line.

  • Wow thank you. Never thought it was that easy :)

    Everytime I selected the text beforehand then I used ctrl-x...

    From Roger Ween
  • Shift-Delete also works. Select a line and hit Shift-Delete it will remove the line and place that line in your clipboard.

    From spoon16

0 comments:

Post a Comment