Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Move selection to new fileNew to Visual Studio Code? Get it now.
Move selection to new file

Move selection to new file

kentos

|
3,335 installs
| (2) | Free
Move selected text/code to a new file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Move selection to new file

The refactorers best friend!
Select your code,
Cmd+P,
'Move selection to new file',
💥

Features

This extension takes the text in selection and moves it to a new file. This comes in handy when for instance refactoring large files and you want to move code fast. It basically removes the lines you've selected and moves it.

Release Notes

We try to keep release notes.

1.0.0

Initial release of Move selection to new file.

1.0.1

New:
New document inherits same languageId - big up to esviza 🥳

Chores:
Making moveToNewDoc more extentable and making input and object instead of positional params.


Enjoy!

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