Skip to content

mattia72/OpenInDelphi

Repository files navigation

Open in Delphi

A Visual Studio Code extension that lets you open the file you're currently editing directly in the Delphi IDE.
Requires DRipExtensions to be installed and configured in Delphi.

Features

  • Opens the current file in VS Code directly in the Delphi IDE
  • Build the active project in Delphi IDE from VS Code
  • Compile the active project in Delphi IDE from VS Code
  • Seamless switch between VS Code and Delphi
  • Easy to use via Command Palette, context menu, or keyboard shortcuts

Usage

Commands Available

The extension provides three main commands:

  1. Open Current File in Delphi - Opens the current file in VS Code directly in the Delphi IDE
  2. Build Active Project in Delphi - Builds the active project in Delphi IDE
  3. Compile Active Project in Delphi - Compiles the active project in Delphi IDE

Using the Commands

Execute any of the available commands via:

  • Command Palette (Ctrl+Shift+P) -> Search for the command name
  • Keyboard shortcuts:
    • Open Current File in Delphi: Shift+Alt+D
    • Build Active Project in Delphi: Shift+Alt+B
    • Compile Active Project in Delphi: Shift+Alt+C
  • Right-click context menu in the editor or file explorer

Switch from VS Code to Delphi

Execute the "Open Current File in Delphi" command via:

  • Command Palette (Ctrl+Shift+P) -> "Open Current File in Delphi"
  • Default keyboard shortcut: Shift+Alt+D
  • Right-click context menu in the editor or file explorer

Switch From Delphi to VS Code

  • Tools | DRipExtensions | Open With...
    • Default keyboard shortcut: Shift+Alt+O
  • Select "Open in VSCode instance" and push enter.

Requirements

  • VS Code 1.102.0 or higher
  • Delphi IDE installed and configured
  • DRipExtensions 4.10.0 or higher must be installed and configured in Delphi

Installation

  1. Open Visual Studio Code
  2. Go to the Extensions view (Ctrl+Shift+X)
  3. Search for "Open in Delphi"
  4. Click "Install" on the extension by Mattia72-OpenInDelphi
  5. Alternatively, visit the marketplace page and click "Install"

Prerequisites Setup

Important: This extension requires DRipExtensions to be installed in Delphi to work properly.

  1. Install DRipExtensions in Delphi:

    • Download DRipExtensions from GitHub releases
    • Install it in your Delphi IDE (version 4.10.0 or higher required)
  2. Configure DRipExtensions:

    • Open Delphi IDE

    • Go to Tools → DRipExtensions → ⚙️ Settings

    • If necessary, configure the "Open With" settings as shown in the screenshot Open with in Delphi

      • If for some reason it is not in the list, configure a new entry with the following parameters:
        • Caption: Open in VSCode instance
        • Command: <path-to-vscode>/code.exe
        • Parameters: --reuse-window --goto "<FILE>:<LINE>:<COL>"
    • Make sure the "Handle Open in Delphi commands" checkbox is checked DRipExtensions config

  3. Verify Installation:

    • Open a Pascal file in VS Code
    • Press Shift+Alt+D or use Command Palette → "Open Current File in Delphi"
    • The file should open in Delphi IDE at the same line/column
    • Test build/compile commands:
      • Press Shift+Alt+B to build the active project in Delphi
      • Press Shift+Alt+C to compile the active project in Delphi

Extension Settings

This extension provides the following settings:

  • openindelphi.showContextMenu: Enable/disable the context menu item (default: true)
  • openindelphi.showContextMenuOnFileExtension: Show context menu only for files with specified extensions (default: ["*"])
    • Use ["*"] to show for all file types
    • Use specific extensions like ["pas", "dpr", "dpk"] to show only for Delphi files
    • Use empty string [""] to show only for files without extension (e.g., Makefile, README)
    • Use combination like ["pas", "dpr", ""] to show for Delphi files and files without extension
    • Use empty array [] to disable context menu completely

Known Issues

No known issues at this time. Please report any bugs or feature requests on the GitHub repository.

Release Notes

[1.2.0] - 2025-08-29

Added

  • Build Active Project in Delphi command with Shift+Alt+B keyboard shortcut
  • Compile Active Project in Delphi command with Shift+Alt+C keyboard shortcut
  • Context menu support for build and compile commands

Previous Releases

  • [1.1.1] - Package size reduced due to removal of unnecessary files
  • [1.1.0] - Added context menu support for opening files in Delphi IDE
    • Added configurable context menu behavior through extension settings
    • File extension filtering for context menu visibility
  • [1.0.29] - Fixed release script call in package.json
  • [1.0.28] - Improved Delphi window activation logic for minimized state handling
  • [1.0.27] - Updated README.md and improved release automation
  • [1.0.13] - Added default keyboard shortcut (Shift+Alt+D) and user notification for pipe failures
  • [1.0.0] - Initial release with basic functionality to open files in Delphi IDE

For complete changelog, see CHANGELOG.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published