Skip to content

Tip 1.10: How to transpose characters, words, and lines in the editor

March 23, 2013

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

You can use three commands for transposing or swapping text in the editor, namely:

  • Press Ctrl+T to transpose a character.
  • Press Ctrl+Shift+T to transpose a word.
  • Press Alt+Shift+T to transpose a line.

In the following example (where the cursor is placed before the “is” on the commented line “now is the time”), she’ll apply the three commands to illustrate how text is swapped.

Pressing Ctrl+T swaps “i” and the previous space, creating “// nowi s the time”.

Pressing Ctrl+Shift+T swaps “is” and “the”, creating “// now the is time”.

Pressing Alt+Shift+T swaps the current line with the line below it.

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: