Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode - swapping selected texts in vscode

I recently started using VSCode and I am really loving it. I Googled my question and dint find any answers related to VSCode.

Consider I am having the following code:

if (a === 'some condition') 
  return true
else
  return false

If I want swap or switch the return, i.e., I select true and false and is there any keyboard shortcuts or key binding to swap my selections.

Any help would be greatly appreciated.

like image 529
Jeril Avatar asked Oct 18 '22 10:10

Jeril


1 Answers

Not that I know of. I also came across the same issue some time back.

You can use this Transpose plugin for VSCode

Hope this helps :)

PS - This is the issue thread from which I got to know about this plugin:

https://github.com/Microsoft/vscode/issues/12435

like image 151
Sahan Serasinghe Avatar answered Oct 21 '22 02:10

Sahan Serasinghe