open-file-on-git-remote READMEA simple command that allows you to open any file that is tracked in your remote repo in a web browser. This extension supports the following features:
InspirationThe inspiration behind this comes from all the times I've looked up code quickly in VSCode, and wanted to share a link to it to a colleague and had to then search for the same file in the web version of the repository. This removes that step and automatically opens the same file, on the same branch in the web browser based on the repo's git config settings. FeaturesOpen File On Git Remote -- Command PaletteThis extension supplies a command in the Command Palette called "Open File on Git Remote" that, when executed, opens the file that's currently active in the text editor in the git repository service's website. In the web browser, it will open the same file in the same branch that you have open in VSCode. The "Open File on Git Remote" command automatically supports opening any file in the following popular git repository services: What if I use a custom git repository service?If your repo is not hosted on any of the popular services listed above, fear not,
for you can use a setting called Open File on Git Remote -- Text Editor Context MenuAdditionally, you can access the "Open File on Git Remote" command from the context menu in an active text editor. To do this, simply right click on a text editor, and select the "Open File on Git Remote" command from the menu. Open File on Git Remote -- File Explorer Context MenuFinally, you can access the "Open File on Git Remote" command from the context menu in the file explorer. To do this, simply right click on a file in file explorer, and select the "Open File on Git Remote" command from the menu. RequirementsThe file you're attemping to open should be tracked in a git repository and that repository should be hosted on a git repository service. Extension SettingsThis extension contributes a single optional setting:
The In order to support
So, for example, github's Pro Tip: Use workspace-specific settings if your custom url can't make use of
Known IssuesN/A Release Notes0.0.1Initial release of open-file-on-git-remote extension 0.0.2Added command to right-click menu in the text editor and the file explorer. Also cleaned up code and added more logs to the OutputChannel 0.0.3Readme updates & images 0.0.4Filled out the CHANGELOG.md & marketplace settings |