Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeXportNew to Visual Studio Code? Get it now.
CodeXport

CodeXport

Zaxckheal101

|
2 installs
| (0) | Free
Extract highlighted code into a .txt file with a single right-click.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeXport

Extract the code you highlight in VS Code into a .txt file — one right-click, then name it in the native Save As dialog.

Install

code --install-extension codexport-0.2.0.vsix

Once published, search for CodeXport in the Extensions view (publisher Zaxckheal101).

Usage

  1. Open a file (HTML, JS, TS, CSS, JSON… any language).
  2. Highlight the code you want.
  3. Right-click → Extract as Txt, or press Ctrl+Alt+E (Cmd+Alt+E on macOS).
  4. The OS Save As dialog opens in your Downloads folder with the name CodeXport.txt pre-selected — accept it, rename it, pick any folder.

The snippet is written verbatim (UTF-8, original newlines). A toast confirms the result and offers a Reveal File button.

Where files go

CodeXport never creates a folder in your project. The dialog opens in Downloads the first time, then remembers the folder of your last save. If that folder is later deleted, it falls back to Downloads.

File names

The dialog always starts with CodeXport.txt. Typing a name without an extension adds .txt (hero → hero.txt); an explicit extension is respected (notes.md stays notes.md). Cancelling the dialog writes and creates nothing.

Development

npm install
npm run compile

Press F5 to launch the Extension Development Host. Press Ctrl+R there to reload after edits (use npm run watch to keep out/ fresh).

Testing

npm test

Runs the mocha suite inside a real VS Code instance via @vscode/test-cli (first run downloads VS Code). Covers the fixed default name, dialog prefill, no-folder-creation on cancel, remembered destination, .txt appending, nested paths, CRLF preservation, warning paths, and manifest/keybinding registration.

Packaging

npm run package
code --install-extension codexport-0.2.0.vsix

License

MIT — see the LICENSE file.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft