<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dotvim/bundle/github-url, branch master</title>
<subtitle>My vim configuration</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/'/>
<entry>
<title>github-url: Fix URL generation when `:pwd` is below repository root</title>
<updated>2019-09-10T23:44:00+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2019-09-10T23:20:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=cfebd1313557a47730a78d562207998da1451c76'/>
<id>cfebd1313557a47730a78d562207998da1451c76</id>
<content type='text'>
If the `:pwd` was a subdirectory of the repository root, the path in the
constructed GitHub URL would not include any subdirectories up to and
including the current working directory. This created an incorrect path
in the URL, resulting in a 404.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the `:pwd` was a subdirectory of the repository root, the path in the
constructed GitHub URL would not include any subdirectories up to and
including the current working directory. This created an incorrect path
in the URL, resulting in a 404.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Copy the URL to the clipboard in addition to printing it</title>
<updated>2018-04-05T23:40:13+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:40:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=4918150bb463678b1a5eebfe0b8138d4cc7fb82a'/>
<id>4918150bb463678b1a5eebfe0b8138d4cc7fb82a</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Add `--no-patch` to `git show` command</title>
<updated>2018-04-05T23:35:26+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=bcb1336bd008efde95daae0599a656ca67c2d94f'/>
<id>bcb1336bd008efde95daae0599a656ca67c2d94f</id>
<content type='text'>
If there's a diff in the index, that will get included in the output of
this command, meaning that just after the SHA, there will be a
multi-line diff string that completely messes up the constructed URL.

Use the `--no-patch` flag to suppress diff output.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If there's a diff in the index, that will get included in the output of
this command, meaning that just after the SHA, there will be a
multi-line diff string that completely messes up the constructed URL.

Use the `--no-patch` flag to suppress diff output.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Move functions into `autoload`</title>
<updated>2018-04-05T23:33:55+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:33:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=2e3d5630df8ce9ffacc9f03c5f7ec5327f0b9c59'/>
<id>2e3d5630df8ce9ffacc9f03c5f7ec5327f0b9c59</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Get rid of useless `echo`</title>
<updated>2018-04-05T23:25:18+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=78a23cd259c7dbca34d0dcf78b8b99aa0a5db1a5'/>
<id>78a23cd259c7dbca34d0dcf78b8b99aa0a5db1a5</id>
<content type='text'>
I used this for testing purposes but it's no longer relevant.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I used this for testing purposes but it's no longer relevant.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Document functions</title>
<updated>2018-04-05T23:24:04+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:24:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=4d07c3d7e2b87113aa18e3198d7205dbaba290c9'/>
<id>4d07c3d7e2b87113aa18e3198d7205dbaba290c9</id>
<content type='text'>
Add doc comments to these functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add doc comments to these functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Don't add ending line to URL if it wasn't part of the range</title>
<updated>2018-04-05T23:21:01+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:21:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=4b962150bb8dca9a260858436b8b097d4dfb3b28'/>
<id>4b962150bb8dca9a260858436b8b097d4dfb3b28</id>
<content type='text'>
If the command was executed as:

    :6GitHubFileURL

we previously appended `#L6-L6` to the URL. This change appends only
`#L6` in that case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the command was executed as:

    :6GitHubFileURL

we previously appended `#L6-L6` to the URL. This change appends only
`#L6` in that case.
</pre>
</div>
</content>
</entry>
<entry>
<title>github-url: Add `&lt;count&gt;` to command</title>
<updated>2018-04-05T23:19:13+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T23:19:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=5b5fd9c81f20aa37ee5b8f2771a5dc6baafa3bb4'/>
<id>5b5fd9c81f20aa37ee5b8f2771a5dc6baafa3bb4</id>
<content type='text'>
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
`&lt;count&gt;`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
`&lt;count&gt;`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add 'github-url' plugin</title>
<updated>2018-04-05T22:56:32+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2018-04-05T22:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/dotvim/commit/?id=2255d27130b29c578366d6cd0fa41f3af94c1702'/>
<id>2255d27130b29c578366d6cd0fa41f3af94c1702</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
</feed>
