aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/github-url/plugin
AgeCommit message (Collapse)Author
2018-04-06github-url: Copy the URL to the clipboard in addition to printing itTeddy Wing
Previously all we did was `echo` the generated URL to the command line. This was mainly for debugging purposes, but it strikes me that this would be nice to keep so that users can validate that the correct URL was generated. In addition to doing this, though, we need to provide an easy way to send that URL string into other programs like chat or an input field in a web browser. Copy the URL to the Mac OS X clipboard to make it easier to share.
2018-04-06github-url: Move functions into `autoload`Teddy Wing
Improve performance by eliminating the functions from the `plugin` file. Also introduces a new `github_url#GitHubURL()` function that serves as an entry point into the plugin. Add a `g:loaded_github_url` check to prevent plugin re-sourcing and be a good Vim citizen.
2018-04-06github-url: Get rid of useless `echo`Teddy Wing
I used this for testing purposes but it's no longer relevant.
2018-04-06github-url: Document functionsTeddy Wing
Add doc comments to these functions.
2018-04-06github-url: Don't add ending line to URL if it wasn't part of the rangeTeddy Wing
If the command was executed as: :6GitHubFileURL we previously appended `#L6-L6` to the URL. This change appends only `#L6` in that case.
2018-04-06github-url: Add `<count>` to commandTeddy Wing
Using a `count` of 0 allows us to determine in `s:FileURL` whether a range was given on the command line. This count needs to be passed into the function explicitly with `<count>`.
2018-04-06Add 'github-url' pluginTeddy Wing
A rough working implementation of a plugin that generates a GitHub URL for the current file. It gets the base URL from the current Git repo's `origin` remote and uses the current commit SHA. Lines can also be highlighted by passing a range to the command. This makes it easier to share a bit of code that I see in the editor with other people on my team in chat or the issue tracker.