differentmatt / vscode-copy-github-url Goto Github PK
View Code? Open in Web Editor NEWCopy GitHub URL vscode extension
Copy GitHub URL vscode extension
Hello there,
Can't make it work, with command line or shortcut.
Nothing happens, I don't see any error in VSCode console output.
From debug console:
[Deprecation Warning] 'workspace.rootPath' is deprecated and should no longer be used. Please use 'workspace.workspaceFolders' instead. More details: https://aka.ms/vscode-eliminating-rootpath
Hello, great extension, thank you!
Very useful for code peer reviews over Slack / instant messaging, to exchange URLs whilst working locally from VSCode.
However the inverse functionality would be very useful too.
For example I would like to be able to copy such URL: https://github.com/differentmatt/vscode-copy-github-url/blob/ad85a468eb8f1b05979591335ba391c58abeb5a7/src/main.js#L6-L8
vscode-copy-github-url/src/main.js
Lines 6 to 8 in ad85a46
...and to show src/main.js
in VSCode with the code selection line 6-8 (extracted from the URL #L6-L8
).
Any thoughts?
If unable to determine the default branch, main
is used. The default branch for private repositories cannot be determined at the moment.
We should make this fallback value configurable to support private repos with master
. See rootGitFolder
in this extension for example of configuration setting.
vscode-copy-github-url/package.json
Line 44 in b5d106b
It exists though.
When you have added additional lines to the code base, the lines numbers get thrown off. It would be an awesome feature if the application tried to identify the desired line within the last committed version of the file from the repo. If this isn't already a feature, I'd be happy to put a bounty on it.
Thanks,
Justin
Can this extension be updated to detect when the default branch for a repo is not master
but main
or dev
or something else?
we have a monorepo that is not using submodules
In order to get other extensions to work, I open each subfolder in a different instance of vs code, but this then causes this extension to not be able to pick up the url.
If possible it would be nice to have a setting where I could set the path to the .git folder
Settings in package.json don't have an effect on the marketplace listing:
https://marketplace.visualstudio.com/items?itemName=mattlott.copy-github-url
Hi Matt! I just found your extension and am looking forward to using it. It's a great idea!
I installed VSCode in Windows, however I run it in the Ubuntu Windows Subsystem for Linux (WSL) environment which lets me develop using Linux.
When I install your extension and try to use it in VSCode, I get the following error:
(Copy GitHub URL) Error: spawnSync /home/chris/.vscode-server/extensions/mattlott.copy-github-url-0.10.0/fallbacks/windows/clipboard_x86_64.exe ENOENT
Presumably, this is because the extension installs in the WSL Linux environment, but the exe you are using to copy to the clipboard cannot run in that environment. Any ideas on how to work around this?
It seems in the remote machine, although this plugin is installed, it will still try to copy url to remote xsel
rather than the local machine.
Hi there, there is a default for Ctrl+Shift+L
to select all highlighted instances.
May you please change it to Ctrl+Alt+L
. Otherwise I have to put two extra keybindings in custom. One to Restore Ctrl+Shift+L
to { "key": "ctrl+shift+l", "command": "editor.action.selectHighlights", "when": "editorFocus" }
and another to make this extension work: { "key": "ctrl+alt+l c", "command": "extension.gitHubUrlPerma", "when": "editorTextFocus" }
Like https://github.com/kawamataryo/copy-git-link for JetBrains, it would be nice if there would be an option to generate markdown that looks like this (code snippet included if text is selected):
[/somepackage/SomeClass.java#L42-L44](https://github.com/huyz/myrepo/blob/67b33efca188/somepackage/SomeClass.java#L42-L44)
```java
public void setLast_name(String last_name) {
this.last_name = last_name;
}
```
Just installed the extension. ^ + L C (macOS's version of ctrl + L C) doesn't seem to do anything. I've checked the keybindings in VScode and ^ + L C is indeed bound to this extension. If I try and paste, then it pastes what was previously in my clipboard; not the GitHub url.
For example if we use partial hash like https://github.com/differentmatt/vscode-copy-github-url/blob/ad85a468eb8f/extension.js#L12-L19
in Github issue, it won't be converted to the code block automatically:
https://github.com/differentmatt/vscode-copy-github-url/blob/ad85a468eb8f/extension.js#L12-L19
If we use a full git hash like this https://github.com/differentmatt/vscode-copy-github-url/blob/ad85a468eb8f1b05979591335ba391c58abeb5a7/extension.js#L12-L19
It will be converted like this:
vscode-copy-github-url/extension.js
Lines 12 to 19 in ad85a46
Dear contributors, thanks for this awesome plugin, I'm gonna stick to it because it supports Git worktrees and master
URLs, unlike the one VSCode folks mention on their website.
Is there a chance you could add shortcuts to actually open those URLs in the browser?
I could contribute myself if you don't have time for this, but decided to ask you first.
The current method of using default-branch for detecting the default branch does not work for private repos. See related #21.
When copying an url I got something like https://github.com/M-Zuber/octokit.net/blob/master\Octokit\Clients\Enterprise\EnterpriseClient.cs#L9
instead of https://github.com/M-Zuber/octokit.net/blob/master/Octokit/Clients/Enterprise/EnterpriseClient.cs#L9
This is on Windows 10 if that makes a difference
Warning when publishing via vsce
: WARNING LICENSE.md, LICENSE.txt or LICENSE not found
Tip displayed when packaging extension via vsce:
For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore
https://code.visualstudio.com/api/working-with-extensions/bundling-extension
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.