Gitline is a VS Code extension that allows you to quickly copy the remote URL of the current line or selection in your code. It supports both GitHub and GitLab repositories.
Features
Copy the remote link of the current line or selection
Copy the remote link of the current file
Support for both GitHub and GitLab repositories
Set a default remote for repositories with multiple remotes
Quick access through context menu in the editor
Installation
Open VS Code
Go to Extensions (Ctrl+Shift+X)
Search for "Gitline"
Click Install
Requirements
VS Code Git extension (vscode.git)
Usage
Copy Line Link
Right-click on a line in your code
Select "Gitline: Copy the remote link of the current line"
The link will be copied to your clipboard
Copy Line Link with Current Remote
Right-click on a line in your code
Select "Gitline: Copy the remote link of the current line (current remote)"
The link will be copied to your clipboard
Set Default Remote
If your repository has multiple remotes:
Open the command palette (Ctrl+Shift+P)
Type "Gitline: Set default remote"
Select your preferred remote from the list
Extension Settings
This extension contributes the following settings:
gitline.defaultRemote: The default remote to use when copying the remote link
Known Issues
None at this time.
Release Notes
0.0.1
Initial release
Support for GitHub and GitLab repositories
Copy line links with default or current remote
Set default remote for repositories with multiple remotes