GitLink
Open your Sublime Text files on GitHub, Bitbucket, Gitlab or Codebase
Details
Installs
- Total 4K
- Win 1K
- Mac 2K
- Linux 934
| Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | Jan 14 | Jan 13 | Jan 12 | Jan 11 | Jan 10 | Jan 9 | Jan 8 | Jan 7 | Jan 6 | Jan 5 | Jan 4 | Jan 3 | Jan 2 | Jan 1 | Dec 31 | Dec 30 | Dec 29 | Dec 28 | Dec 27 | Dec 26 | Dec 25 | Dec 24 | Dec 23 | Dec 22 | Dec 21 | Dec 20 | Dec 19 | Dec 18 | Dec 17 | Dec 16 | Dec 15 | Dec 14 | Dec 13 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
GitLink
It's a Sublime Text plugin for shareable URLs to files in your source repositories. No more traversing your file structure to find the file you are working on. With support for GitHub, Bitbucket, GitLab, and many more. See the full list or configure your own.
How it works
| Sidebar | File content |
|---|---|
![]() |
![]() |
Or search for “GitLink” in the Command Palette Ctrl+Shift+P (Cmd+Shift+P on MacOS).
Copy URLs to files
Right click any Git-tracked file in the sidebar and go to the GitLink menu item to see options, or Ctrl+Shift+C to copy the URL for the current file (Cmd+Shift+C on MacOS).
Copy URLs to files with a deeplink to the line number
Right click anywhere within the file you are currently editing. Your cursor position determines which line number will be used for the deeplink. If supported by the Git service provider, you can select multiple lines to deeplink the line range.
Open URLs in your default browser as a new tab
Ctrl+Shift+O to skip a step and open any of the links in a new tab of your default web browser (Cmd+Shift+O on MacOS).
Installation
The easiest way is to install is using Package Control. Search for GitLink in the PC client plugin and install.
To install manually,
clone or symlink https://github.com/rscherf/GitLink.git
(or your fork)
into the Sublime Text Packages folder:
+ Mac: ~/Library/Application Support/Sublime Text/Packages
+ Linux: ~/.config/sublime-text/Packages
+ Windows: %APPDATA%\Sublime Text\Packages
Git service provider support
Repository hosts are listed alphabetically.
Upon install
Arch Linux[gitlab], Assembla, Azure (unverified), Bitbucket, Codebase, Codeberg[forgejo], Debian Salsa[gitlab], Eclipse[gitlab], GitHub, GitLab, Gitea, Gitee, GNOME[gitlab], GNU Savannah[cgit], Gogs, Launchpad[cgit], Kernel.org[cgit], KDE[gitlab], Fedora Pagure, Phabricator, Phorge, Radicle, RhodeCode, Sourcehut, SourceForge[sourceforge], Tangled, and TuxFamily[cgit]
With domain configuration
Any of the above plus CGit, Gerrit, GitWeb (which comes with Git), and Forgejo
If you have a supported host
with their host ID in the hostname,
no configuration is required:
e.g. gitlab.example.com.
With full configuration
Any site you want. Please open an issue or PR if it would help others.
Configuration
Things work out of the box for many Git hosts. To customize further, use the Preferences: GitLink Settings command to open the settings. Defaults are on the left, and your changes are on the right.
Repo matching
If you self-host a Git provider,
you can link your domain to its format
with "user_repo_lookup":
Make a map of (JSON-escaped) domain-matching regular expressions
to the ID of the Git software your server runs.
If you need to create a new Git provider,
first consider making a PR here.
Otherwise, use "user_repo_hosts"
and follow the sample in the settings file,
or copy and modify one
from the defaults below it.
Link format
To switch to generating permanent links
that reference a Git commit hash instead of branch name,
set "revision_type": "commithash".
Commits not pushed to the server will 404.
Contribute
Git and Sublime Text are powerful; I know all of you can make this way better than me.
- Fork / clone the repository.
- Add whatever you'd like.
- Run tests with the UnitTesting package.
- Submit a Pull Request.
Copyright
- Star the Github repository.
- Follow @ryanscherf on Twitter, and tell me how much you love this plugin.
- Use it however you'd like.
[cgit]: Linked to cgit
[forgejo]: Linked to forgejo
[gitlab]: Linked to gitlab
[sourceforge]: SourceForge does not support blame or line numbers.

