8000 GitHub - sshaw/git-link: Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ git-link Public

Emacs package to get the GitHub/Bitbucket/GitLab/... URL for a buffer location

Notifications You must be signed in to change notification settings

sshaw/git-link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-link

MELPA Build Status

Interactive Emacs functions that create URLs for files and commits in GitHub/Bitbucket/GitLab/... repositories.

git-link returns the URL for the current buffer's file location at the current line number or active region.

git-link-commit returns the URL for the commit at point.

git-link-homepage returns the URL for the repository's homepage.

URLs are added to the kill ring.

Usage

Functions can be called interactively (M-x git-link) or via a key binding of your choice. For example:

(global-set-key (kbd "C-c g l") 'git-link)

With a single prefix argument prompt for the remote's name. Defaults to "origin".

With a double prefix argument invert the value of git-link-use-commit.

With a prefix argument of -, generate a link without line numbers.

Works with Dired, Magit, VC revisions, and Tramp too.

Settings

Global setting are elisp variables. They can be set directly or via M-x customize.

Local settings are managed via the repository's git configuration. They can be set via:

git config --local --add setting value

Local settings have precedence over global settings.

Global

git-link-default-remote