ruanyl / vim-gh-line

vim plugin that open the link of current line on github
MIT License
408 stars 37 forks source link

Centralize command execution, echo URL if no open command is configured #56

Closed smkent closed 2 years ago

smkent commented 2 years ago

When vim can't open a web browser (e.g. in a remote terminal over ssh), there may not be a useful system command to execute with the GitHub URL. As a fallback, this change simply echom's the GitHub URL so the user can manually copy/middle-click it.

This change additionally deduplicates the command invocation code into a helper function.