1

I have installed sourcegraph VScode extension and it works well to search code. Often times I need to share the sourcegraph code link with the team.

I am not able to find the ability to access sourcegraph url from the extension.

I search for some text using extension, then open the file and tried "Copy relative path, Copy remote file URL" but all of them gives me file path without the host url.

It's a pretty simple task to append the hostname and file path but it would be much easier if there is quick way to copy the path url.

Rohit
  • 6,365
  • 14
  • 59
  • 90
  • Hi Rohit, I'm trying to find you an answer from a teammate. – jdorfman Mar 30 '22 at 19:54
  • Hello @rohit you can right-click inside the editor file, and get a shareable link by clicking on the “Copy Sourcegraph File Link” option that shows up. Please ensure you are on the latest VS Code extension version. – unicodeveloper Mar 31 '22 at 11:26
  • 1
    I just tried that and couldn't find `Copy Sourcegraph File Link` option. I am on `v2.2.0`. However, I just found out Sourcegraph icon in top right corner, next to *Split Editor Right* button. Clicking on that icon, opened the browser with correct url. However, that page ended up with error ``` Error Sourcegraph encountered an unexpected error. If reloading the page doesn't fix it, contact your site admin or Sourcegraph support. Illegal argument: line must be non-negative ``` This works for now. Thank you – Rohit Mar 31 '22 at 18:56

1 Answers1

1
  1. Search a file through sourcegraph extension
  2. Open file
  3. Click Sourcegraph icon in top right corner. (Open file in Sourcegraph web)

Open file in sourcegraph web

Rohit
  • 6,365
  • 14
  • 59
  • 90