After playing around a bit with GitBlameOpenFileURL and GItBlameCopyFileURL I thought it would be a great idea to add optional range functionality to the line selection. You would be able to select ranges of lines to reference, and many git repository hosting platforms support line ranges. If you execute one of these commands with a range (i.e. :74,84GitBlameOpenFileURL) or with a visual selection, the resulting URL will have the range highlighted (here is an example range). Otherwise, the existing behavior (selecting an individual line) will work as expected.
I tested in Github, Gitlab, and SourceHut repos (SourceHut uses a slightly different URL pattern).
After playing around a bit with
GitBlameOpenFileURL
andGItBlameCopyFileURL
I thought it would be a great idea to add optional range functionality to the line selection. You would be able to select ranges of lines to reference, and many git repository hosting platforms support line ranges. If you execute one of these commands with a range (i.e.:74,84GitBlameOpenFileURL
) or with a visual selection, the resulting URL will have the range highlighted (here is an example range). Otherwise, the existing behavior (selecting an individual line) will work as expected.I tested in Github, Gitlab, and SourceHut repos (SourceHut uses a slightly different URL pattern).