Miscellaneous Debris

Avner Kashtan's Frustrations and Exultations
I pity the fool who messes with CTRL-SHIFT-T.

The Visual Studio IDE, among its myriad options and combinations and features and so forth, has a trio of rather odd key combinations:

CTRL-T - Interchanges the current letter and the one after it.
CTRL-SHIFT-T - Same thing, only for the current word.
ALT-SHIFT-T - Same thing, only for the current line.

These keybindings have been there at the very least since Visual Studio 4, where I first came across them.

And I wonder - what are they good for? Is there anyone that uses them regularly, or at all? What are they good for?

Published Monday, August 22, 2005 7:24 PM by AvnerK

Filed under: ,

Comments

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Monday, August 22, 2005 1:07 PM

Perhaps to quickly correct 'teh' to 'the' etc. ? Otherwise it will require more keystrokes. (not that I use it, I sometimes accidently pressed those and wondered, 'what happened? and why!?' :D

Frans Bouma

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Monday, August 22, 2005 2:49 PM

think I able being switch to is words wonderful a and function miss I whenever it editor an not does it provide.

Jeroen van den Bos

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Monday, August 22, 2005 3:04 PM

"Yoda"ize your code aswell as your talk!

Ariel

# Re: I pity the fool who messes with CTRL-SHIFT-T.@ Monday, August 22, 2005 4:59 PM

I remapped those to TestDriven's Test & Test with debugger.

Ayende@ayende.com (Ayende Rahien)

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Tuesday, August 23, 2005 3:26 PM

I actually use ALT-SHIFT-T all the time. It doesn't offer hours of time savings or anything but it's just a slightly better way to do something small which you can't argue is a bad thing.

Say you have a line of text:

> This is a test.

And then you realize you want to put a DIV around it... you start by adding the DIV to the IDE where it automatically closes the DIV for you:

> <div></div>
> This is a test.

Break the opening and closing DIV apart:

> <div>
> </div>
> This is a test.

Put the cursor on the "</div>" line and press ALT-SHIFT-T:

> <div>
> This is a test.
> </div>

Jason

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Thursday, August 25, 2005 1:30 PM

I'm a keyboard shortcut junkie. With each new release of a dev tool, I always learn the new ones. I loved this combination, particularly when I want to move something down a few lines.

Lets say, for instance, that I've assigned a variable on one line, but after testing I decide I should do the assignment after a few other operations. I ALT+SHIFT+T the line all the way down to where I want it. Very useful. Sure, you could accomplish the same thing with a cut and paste, but why would you when you can do it with one hand! ;)

Tobin Titus

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Monday, August 29, 2005 6:55 AM

The same feature was available under Emacs and shell on Unix (don't know for vi, but would not be a surprise).
I suppose that it was very useful when typing from a unix console without proper arrow keys/backspace support !
Funny to see features 10+'s years old to still be around !

Frederic

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Thursday, June 15, 2006 5:22 PM

Tobin Titus...interesting use for Ctrl+Shift+T.  Another great way to cut a whole line with a return after it in VS, Shift+Delete (cuts the line with a return, it doesn't matter where you are in the line) and Shift Insert or Ctrl V (paste).

tickko

# re: I pity the fool who messes with CTRL-SHIFT-T.@ Friday, August 29, 2008 2:06 PM

I would love it if there were a "transpose" command for = signs. So if you say

x = y

a magic key press would switch it to

y = x

I can't imagine the guy who put it in these functions in Visual Studio couldn't come up with a use for the one I want---so anyone know if that's already in there?

pelesl

Leave a Comment

(required) 
(required) 
(optional)
(required)