A VS Code extension that allows you to open the web version of files in your Git repository.
Note for JetBrains IDE users: If you're using IntelliJ IDEA, WebStorm, or other JetBrains IDEs, we recommend using GitLink by Ben Gibson which provides similar functionality for JetBrains platforms.
Features
Right-click on a file in the editor and select "Open in GitHub" to open the file in your browser.
Right-click on a file in the editor and select "Copy GitHub Link" to copy the link to your clipboard.
Right-click on a file in the explorer and select "Open in GitHub" to open the file in your browser.
Right-click on a file in the explorer and select "Copy GitHub Link" to copy the link to your clipboard.
Right-click on a file in the explorer and select "Copy GitHub Markdown" to copy the markdown link to your clipboard.
Right-click on a file in the explorer and select "Copy GitHub Markdown Snippet" to copy the markdown snippet to your clipboard.
Right-click on a file in the explorer and select "Create GitHub Snippet Image" to open ray.so and create a Code Snippet Image.
Support multi-file copy in explorer.
Supports both SSH and HTTPS remote URL formats.
Automatically detects if the project uses a supported Git hosting platform when loading, and prompts the user if not.
Supports custom Git hosting platforms and URL templates.
Support pen tool to draw annotations on code snippet images. Double-click to clear drawings.
{remote:url:path:n}: The nth segment of the remote URL path (index starts from 0) (e.g., for git@github.com:alanhe421/alfred-workflows.git, {remote:url:path:0} is alanhe421, {remote:url:path:1} is alfred-workflows)
{line:start}: Line number (e.g., 1)
{line:end}: Line number (e.g., 10)
gitlink.domainRegistry: Domain-to-platform mapping configuration, with the following fields:
domain: Domain (e.g., github.com, gitlab.com)
platform: Platform name, must match a platform name defined in gitlink.platforms
gitlink.useCompactMenu: Whether to use compact menu style. When enabled, all GitLink commands will be grouped under a single submenu to reduce clutter in context menus. When disabled, main commands will appear directly in the context menu. Default is false.
gitlink.rememberRemoteSelection: Whether to remember the remote selection for the current session. When enabled, the extension will remember your remote selection for the current session. You'll only be prompted to select a remote once per project session. When disabled, you'll be prompted each time. Default is false.
gitlink.useRemoteForCodeImage: Whether to use remote service for code snippet images. When enabled, the extension will use the remote service - ray.so to create code snippet images. When disabled, the extension will use the local service to create code snippet images. Default is false.
Internationalization
GitLink supports multiple languages:
English
简体中文 (Simplified Chinese)
The extension automatically detects your VS Code language setting and displays the interface in the appropriate language.