Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Link from VS to Github in Browser #106
I wouldn't let the above stop the feature, because as I mentioned, I usually am aware of the state of changes I've made and even if its not exact, usually getting me within range of the correct line saves me a ton of work.
Other IDEs and Text Editors
BTW, there's already code in place to handle menus and commands. The package adds context menus in the "Connections" area like this - https://github.com/github/VisualStudio/blob/master/src/GitHub.VisualStudio/GitHubPackage.cs#L51
Happy new year everyone!
Indeed, work has not been started on this. Not enough hands and omg I needed a rest after last year! I would LOVE a PR on this, these are the little things that really make coding easier.
I've created a new branch for this feature and added some things you will need to get this working, to start with: https://github.com/github/VisualStudio/tree/feature/link-to-vs. The branch adds the "Get Link" context menu and a handler for it, and gets the file name and line from VS, as an example.
Here's some thoughts on how to do this:
The link can be to a commit hash, so no need for branch information. No need to even check if the local file matches the remote version, I agree, just generate the link with the line and let people sort it out if they don't match exactly.
You can use
If it's not null,
In the command handler of
I have completed a basic implementation for the opening of a single line or a group selection.
Above is a sample link that it made.
Before I dive into the nested menu controller to include the copy to clipboard feature, are there any current examples in the app so I can match that coding style?
@austin94 For the copy link command, just add another button/idsymbol/pkgcmdid entry for it and then call