To swap selected texts in VSCode, follow these steps:
- Select the text you want to swap by highlighting it with your cursor.
- Cut the selected text by pressing Ctrl + X (Windows/Linux) or Cmd + X (Mac).
- Place your cursor where you want to insert the text.
- Paste the cut text by pressing Ctrl + V (Windows/Linux) or Cmd + V (Mac).
- Select the text you want to swap with by highlighting it with your cursor.
- Cut the selected text by pressing Ctrl + X (Windows/Linux) or Cmd + X (Mac).
- Place your cursor where the original selected text was.
- Paste the new selected text by pressing Ctrl + V (Windows/Linux) or Cmd + V (Mac).
The two selected texts should now be swapped.