Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Insert FilesNew to Visual Studio Code? Get it now.
Insert Files

Insert Files

Rook Survey Software

| (0) | Free
Insert the contents of several files at the cursor, or combine files from the Explorer into one, like TextPad's Edit > Insert > Files.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Insert Files

Insert the contents of several files at the cursor, or combine files into one new file. It works like TextPad's Edit → Insert → Files.

Built by a land surveyor for merging field files: multiple days of RW5 raw data, STAR*NET data files, CSV point files, or any other text.

Commands

Command Where What it does
Insert Files at Cursor… Editor right-click menu, Command Palette Pick one or more files. Their contents go in at the cursor, or replace the selection.
Combine Files into New Editor… Explorer right-click menu (multi-select), Command Palette Combines the selected files into a new untitled editor. The new editor uses the first file's language and line endings.

There's no default keybinding. TextPad uses Ctrl+Shift+V, but VS Code already uses that key for Markdown preview. To add your own, go to File → Preferences → Keyboard Shortcuts and search for "Insert Files".

How it works

  1. Pick files. You can select several in the dialog, or in the Explorer.
  2. Set everything on one form. A form opens in a tab beside your file:
    • Order: files start in natural name order (DAY2 before DAY10). Drag a row to move it, or select it and press Alt+↑/↓. You can also sort by name or modified date, or reverse the list.
    • Include or skip: uncheck a file (or press Space on it) to leave it out.
    • Header before each file: adds a # Inserted from: <file> line before each file. The comment marker box is filled in for file types that have one (STAR*NET, RW5). For other types it's empty, and you can type your own.
    • RW5 only: comment out repeated JB and matching MO records (see below).
    • Press Enter or Insert to go ahead, or Esc or Cancel to back out. Closing the tab also cancels.
  3. Insert. Everything goes in as a single edit, so one Undo removes it. The insert goes at the cursor in your file. If you click somewhere else in the file while the form is open, it goes there instead.

Details:

  • Each inserted file is made to end with a line break, so the last line of one file never joins the first line of the next.
  • Line endings are converted to match the file you're inserting into.
  • If the cursor is in the middle of a line, the insert starts on a new line.
  • Binary files are skipped, with a warning.
  • If a file isn't valid UTF-8, it's read as Windows-1252, so characters like ° come through correctly instead of turning into �. You'll get a message listing those files.
  • If a source file is open with unsaved changes, the text as it is on screen gets inserted.
  • There's no limit on the number of files.

RW5: merging setup records

Every RW5 file starts with its own JB (job) and MO (mode) records. When you insert two or more RW5 files, the form has an extra option, Comment out repeated JB and matching MO records. Checking it turns headers on too:

  • A # Inserted from: <file> note goes before each file.
  • In the 2nd and later files, the leading JB record is commented out.
  • In the 2nd and later files, the leading MO record is commented out only if it exactly matches the first file's MO. An MO that differs (units, scale factor, etc.) is kept, and you're warned so you can check it.
  • MO records later in a file (a mid-job mode change) are never touched.

Commented-out records stay in the file as # JB,… lines, so nothing is lost. TDS skips # lines when it reads the file.

Requirements

  • Visual Studio Code version 1.75.0 or higher

Settings

Setting Default Description
insertFiles.commentMarkers { "starnet": "#", "rw5": "#" } The default comment marker for headers, by language ID. For languages that aren't listed, the marker box starts empty.

Release Notes

See CHANGELOG.md (shown on the Marketplace Changelog tab).

Support

Published by Rook Survey Software. Questions or issues: support@rooksurveysoftware.com

License

MIT © Rook Survey Software LLC


Product and file-format names mentioned here are trademarks of their respective owners. This extension is an independent project by Rook Survey Software and is not affiliated with or endorsed by them.

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