Skip to content

feat: add file URL commands (no line range)#2

Open
bjornwiberg wants to merge 1 commit intok2589:mainfrom
bjornwiberg:feat/file-url-commands
Open

feat: add file URL commands (no line range)#2
bjornwiberg wants to merge 1 commit intok2589:mainfrom
bjornwiberg:feat/file-url-commands

Conversation

@bjornwiberg
Copy link
Copy Markdown

Summary

  • Adds GetGithubBranchFileUrl command — copies the GitHub URL for the current file using the branch name
  • Adds GetGithubFilePermalink command — copies the GitHub URL for the current file using the commit hash
  • These complement the existing visual-mode line selection commands with normal-mode file-level URL commands

Example output

GetGithubBranchFileUrl:

https://github.com/username/repo/blob/main/lua/init.lua

GetGithubFilePermalink:

https://github.com/username/repo/blob/a1b2c3d/lua/init.lua

Changes

  • Added M.get_github_file_url(use_permalink) function (reuses existing git helpers)
  • Registered two new user commands in setup()
  • Updated README with new commands and examples

Add GetGithubBranchFileUrl and GetGithubFilePermalink commands for
copying GitHub URLs for the current file without a line range.
Useful for sharing file links in normal mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant