Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To swap selected texts in VSCode, follow these steps:

  1. Select the text you want to swap by highlighting it with your cursor.
  2. Cut the selected text by pressing Ctrl + X (Windows/Linux) or Cmd + X (Mac).
  3. Place your cursor where you want to insert the text.
  4. Paste the cut text by pressing Ctrl + V (Windows/Linux) or Cmd + V (Mac).
  5. Select the text you want to swap with by highlighting it with your cursor.
  6. Cut the selected text by pressing Ctrl + X (Windows/Linux) or Cmd + X (Mac).
  7. Place your cursor where the original selected text was.
  8. Paste the new selected text by pressing Ctrl + V (Windows/Linux) or Cmd + V (Mac).

The two selected texts should now be swapped.