Skip to content

slackorama/github-browse-file

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 

Repository files navigation

github-browse-file

View the file you're editing in Emacs on GitHub or Bitbucket depending on the value of remote.origin.url.

Installation:

Available as a package in Marmalade and MELPA.

M-x package-install github-browse-file

You can change some defaults using M-x customize-group github-browse-file

Usage:

Call github-browse-file (for the git blob) or github-browse-file-blame (for the git blame) to view current file on GitHub. With a prefix argument (C-u), you can force them to use the "master" branch.

github-browse-commit can be used to link to the current commit.

Enterprise support

If you use Github Enterprise or Bitbucket Server, add your domain to github-browse-file-domains via customize or use something like in your init file:

(add-to-list 'github-browse-file-domains '("git.dayjob.com" :type github))

For Bitbucket you would do:

(add-to-list 'github-browse-file-domains '("git.dayjob.com" :type bitbucket))

Note: This assumes that your hosted instance is listening on https.

Remotes by a different name

If your remote isn't named origin, you may modify the github-browse-file-remote-names to add your differently named remote. For example:

(setq github-browse-file-remote-names '("upstream" "origin"))

The order of this list matters as the first remote name that returns a url, is the one that is used for the link that is generated.

Contributors

About

View the file you're editing in Emacs on GitHub

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Emacs Lisp 100.0%