Years ago I read about a visual studio shortcut which, if you had a selection, would move the caret/cursor to the start or the end of the selection.
I've tried searching for it, but can't for the life of me find it again.
In the image below, the text is selected and the caret is at the end, (highlighted pink). This shortcut would move the caret to the start of the selection (highlighted yellow).
Does anyone know what this shortcut is?
I'm pretty sure that this the command called Edit.SwapAnchor
. The documentation says that this command:
Swaps the anchor and end points of the current selection.
The keyboard shortcut probably depends on your IDE configuration (i.e., which language you indicated that you primarily develop in on first launch), but in mine it is mapped to Ctrl+R, Ctrl+P. That's the default for C++ developers, matching the default shortcuts for VC++ 6.
Edit:
Indeed, this is the one you're looking for. According to this post on the VS Tips & Tricks Blog, the keyboard shortcut is Ctrl+K, Ctrl+A.
And back in VC++ 2 it was mapped to Ctrl+Shift+X. :-)
I'd open up Tools -> Options -> Environment -> Keyboard, type in "swapanchor" in the search box, and see what it's mapped to in your environment. If you use it frequently, change it to something memorable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With