Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>OMP for VS CodeNew to Visual Studio Code? Get it now.
OMP for VS Code

OMP for VS Code

DevOps Rebels

|
382 installs
| (0) | Free
Open an OMP (oh-my-pi) terminal in the editor area and send context from the active editor into the omp prompt.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

OMP for VS Code

Open an OMP (oh-my-pi) terminal in the editor area and send context from the active editor into the running omp prompt.

Features

  • OMP: Open terminal — opens the omp terminal in a right split of the editor area. Reuses the existing terminal; never spawns a second one.
  • OMP: Send selection to prompt — sends the current selection to omp as [file: <rel> (lines X-Y)] followed by the selected text (or the reference alone — see Selection content), without submitting.
  • OMP: Send file context to prompt — sends [file: <rel>] for the active editor, without submitting.

Requirements

  • VS Code 1.85+
  • The omp CLI available in your shell PATH

Keybindings (macOS)

Action Shortcut
Send selection to prompt Ctrl+Option+Cmd+I
Send file context to prompt Ctrl+Option+Cmd+F

All three commands are also available from the command palette ("OMP: ..."), the editor title bar (omp logo icon), and the OMP activity-bar view — which also shows the omp terminal status (running / not running) and one-click command shortcuts.

Usage

Select code in a file and hit Ctrl+Option+Cmd+I. The terminal opens and focuses with the payload sitting in the input buffer:

[file: src/main.ts (lines 10-14)] const answer = 42;

Nothing is ever submitted — press Enter in the omp terminal yourself when ready. Both commands deliver their text to omp as a paste, so multi-line selections keep their line breaks and files with Windows (CRLF) line endings behave the same. A Shift+Enter newline follows, so the cursor lands on a fresh line for your own input.

Large selections (more than 10 lines or 1000 characters) are handled the way omp handles any large paste — collapsed into a paste chip, or offered through omp's large-paste menu — while the [file: …] header stays visible inline.

Selection content

By default, Send selection sends the reference and the selected text. If you'd rather let omp read the lines itself (shorter prompts, no paste chips), tick Send only the file reference for selections in the OMP view, or set:

"omp.selectionContent": "referenceOnly"

The prompt then gets just [file: src/main.ts (lines 10-14)]. omp reads the file from disk, so when that would give it the wrong content — the file has unsaved changes, isn't saved to disk (untitled), or no workspace folder is open — the selected text is sent anyway and a short notification says why.

Workspace auto-open

After you've used OMP in a workspace (opened the terminal or sent context), opening that workspace again auto-opens the omp terminal without stealing focus. By default omp launches with --continue, resuming the most recent session for that directory — disable via the checkbox in the OMP view or the omp.resumeSession setting.

Development

npm install
npm test           # tsc + mocked-vscode unit tests (CI)
npm run test:e2e   # real VS Code e2e with a fake omp (local, downloads VS Code)
npm run package    # builds omp-vscode-<version>.vsix

npm run test:e2e tests the current stable VS Code by default; set E2E_VSCODE_VERSION=1.85.0 to test the minimum supported version. The fake omp records the exact bytes VS Code delivers (captures in .vscode-test/captures/); the real omp is never started.

OMP_SRC=<oh-my-pi checkout> npm run verify:omp (needs bun) replays the payloads and the e2e captures through omp's own input parser and fails if anything would submit. Rerun it when omp updates.

F5 in VS Code launches the Extension Development Host for manual acceptance testing. Design decisions live in adr/; per-iteration reports in reports/.

Releasing

Releases are tag-driven via the GitLab CI pipeline. The semver tag must equal the version in package.json — the manifest is the source of truth, so the repo and the released version never drift:

  1. Run npm run test:e2e (stable and E2E_VSCODE_VERSION=1.85.0) and npm run verify:omp locally — CI runs only the unit tests.
  2. Bump the version in package.json, commit, and push.
  3. Tag the release: git tag <version> && git push origin <version> (e.g. git tag 0.0.1).
  4. The pipeline runs the test suite first, then verifies the tag matches the manifest version and publishes the extension to the VS Code Marketplace (DevOpsRebels.omp-vscode).

A tag that does not match package.json fails the publish job loudly — bump the version before tagging.

License

MIT

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