简体   繁体   中英

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, ie, I select true and false and is there any keyboard shortcuts or key binding to swap my selections.

Any help would be greatly appreciated.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM