vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Customize Open File on Remote url

Open danikaze opened this issue 2 years ago • 1 comments

There are some issues open related to gitlens not generating the correct remote URL when trying to open a file.

Example: if I use the GitLens: Open File on Remote command, it will generate and open the following url:

`${REPO_URL}/projects/${PROJECT}/repos/${REPOSITORY}/browse#${FILE_PATH}-${FILE_NUMBER}`

when the correct url (in my organization's bitbucket) would be

`${REPO_URL}/projects/${PROJECT}/repos/${REPOSITORY}/browse/${FILE_PATH}#${FILE_NUMBER}`

While I no doubt the currently generated one might be the correct url for mosts/some of the repository configurations, it's not always the case.

Feature request: Provide a configuration field to be able to customize the generated URL by using placeholders such as the pervious example (i.e. provide fields for common values like the REPO_URL, FILE_PATH, LINE_NUMBER, etc.) and let the user decide how the url should be generated (i.e. # instead of - for line numbers, / instead of # for appending the FILE_PATH, etc.)

danikaze avatar Jan 20 '23 00:01 danikaze

consider this example https://github.com/gitkraken/vscode-gitlens/issues/4534#issuecomment-3470027023

jeremyfiel avatar Oct 30 '25 20:10 jeremyfiel