Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Move StatementNew to Visual Studio Code? Get it now.
Move Statement

Move Statement

Preview

zardoy

|
554 installs
| (1) | Free
Move statements in any language!
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Move Statement

TL;DR:

  1. Works almost with any language.
  2. Two main commands: Move Statement: Move Statement Up & Move Statement: Move Statement Down.

Experimental VS Code extension for moving statements using document outline (aka breadcrumbs) knowledge. That's why it is language-independent (if your language has outline support), but it can't be 100% accurate in all cases.

This way mainly created as replacement for Move Line commands and works well for JSON, HTML/Vue and other declarative languages. And for literal properties in any language.

Also in JavaScript/TypeScript:

  • const & type, interface and other declarations
  • JSX elements (with TypeScript Essential Plugins & "tsEssentialPlugins.patchOutline": true)

Bind Commands

There are no default keybindings, however you can (and probably should) set them:

In keybindings.json (> Preferences: Open Keyboard Shortcuts (JSON)):

{
  "key": "alt+shift+d",
  "command": "moveStatement.moveStatementDown",
  "when": "editorTextFocus"
},
{
  "key": "alt+shift+u",
  "command": "moveStatement.moveStatementUp",
  "when": "editorTextFocus"
}

Alternatively, you can bind them to alt+up, alt+down respectively.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft