I'm moving from Eclipse to Visual Studio .NET and have found all my beloved hotkeys except two:
- in Eclipse you can press ALT-← and ALT-→ to visit recent changes you have made, something I use frequently to go back to where I was in some other file and then return. Apparently in VS.NET the CTRL-- and CTRL-SHIFT-- do this but they don't seem to always work (e.g. on laptop, may be a numkey issue with the minus) and don't seem to follow the same algorithm of "where I was" as I am used to in Eclipse. Has anyone gotten this to work and rely on it daily, etc.?
- in Eclipse, to move a line up or down you press ALT-uparrow or ALT-downarrow and you just move it through the code until you get it to where you want it, very nice. Also to make a copy of a line, you can press SHIFT-ALT-uparrow or SHIFT-ALT-downarrow. Both of these hotkeys even work for block of lines that you have selected.
Has anyone discovered these hotkey features in Visual Studio .NET?
A D D E N D U M :
An example of when you would use the second feature described above is to move the bottom line here up into the for loop. In Eclipse, you would put the cursor on the Console.WriteLine and then press ALT-(uparrow), I use that all the time: one key stroke to move lines up and down.
for (int i = 0; i < 10; i++) {
}
Console.WriteLine(i);
Ok, extrapolating Charlie's idea with no-selection-ctrl-c to select a line, in Visual Studio you could put your cursor on Console.WriteLine, (no selection) press CTRL-X and then move up and press CTRL-V.
Paul Ostrowski I tried your tool. It works mostly okay.
The other thing that eclipse does is move the line to the current indentation level.
For example:
Doing a shift-up on console.writeline would change it to
but your tool seems to do this:
For anyone looking for a way to do this in Visual Studio 2010, the free Visual Studio 2010 Pro Power Tools extension adds the capability to move lines up and down.
http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef
Edit.LineTranspose but this doesn't work to move a line up... Here is the macro to move line up