Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Swap KeywordsNew to Visual Studio Code? Get it now.
Swap Keywords

Swap Keywords

L13RARY

|
844 installs
| (0) | Free
Invert or rotate keywords in JavaScript and TypeScript
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Swap Keywords

Invert or rotate keywords in JavaScript, Shell Script and TypeScript.

What's new in Swap Keywords 0.16.0

  • Added super and this as opposite.
  • Added support for trusted, virtual and remote workspaces.

Index

  1. Features
  2. How to use
  3. Available Commands
  4. Keyboard Shortcuts
  5. Recommended Extensions

Features

  • Select a keyword and change it to its opposite e.g. like a boolean from true to false or vice versa.
  • Select a keyword and change it to its next sibling e.g. like an accessor from private -> protected -> public -> private ... The rotation is always in alphabetical order.

How to use

Select the keyword or place a caret in the keyword and run the command or press the keyboard shortcut. The keyword swap works also with multiple different keywords.

Available Commands

  • Invert Keyword - Invert a keyword to its opposite.
  • Rotate Keyword - Rotate a keyword to its next sibling.

Keyboard Shortcuts

macOS

  • Cmd + I -> Invert Keyword
  • Cmd + Shift + I -> Rotate Keyword

Windows / Linux

  • Ctrl + I -> Invert Keyword
  • Ctrl + Shift + I -> Rotate Keyword

If the key bindings don't work, please check Preferences -> Keyboard Shortcuts.

Recommended Extensions

  • JavaScript and TypeScript Snippets
  • Extension Pack
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft