Open the current file (or lines) in remote git repository.
Find a file
2022-09-27 02:24:25 +03:00
.github/workflows chore: add names for gh actions 2022-09-26 23:38:08 +03:00
lua/openingh chore: support opening files with correct fine number 2022-09-27 01:37:15 +03:00
plugin chore: add setup method internaly 2022-09-26 23:53:18 +03:00
.luacheckrc chore: add actions to format and lint the code 2022-09-26 23:28:51 +03:00
.pre-commit-config.yaml chore: add pre-commit config 2022-09-26 23:46:12 +03:00
LICENSE chore: add LICENSE file 2022-09-27 01:43:30 +03:00
Makefile chore: initial commit 2022-09-25 23:30:27 +03:00
README.md chore: update readme.md 2022-09-27 02:24:25 +03:00
stylua.toml chore: initial commit 2022-09-25 23:30:27 +03:00

openingh.nvim

Opens the current file or project page in GitHub.

  • Features
    • Supports MacOS, Linux, and maybe Windows 🤷‍♂️
    • Works with detaches HEAD and support checked out branches
    • Automatically selects the correct line number in the file page

Requirements

  • Neovim 0.7.2+

Installation

packer

  use "almo7aya/neogruvbox.nvim"

Commands

  • :OpenInGHRepo

    • Opens the project's git repository page in GitHub.
  • :OpenInGHFile

    • Opens the current file page in GitHub.

Usage

You can call the commands directly or define mappings them:

-- for repository page
vim.api.nvim_set_keymap("n", "<Leader>gr", ":OpenInGHRepo <CR>", { expr = true, noremap = true })

-- for current file page
vim.api.nvim_set_keymap("n", "<Leader>gf", ":OpenInGHFile <CR>", { expr = true, noremap = true })

TODO

  • Support the current file cursor position
  • Support visual mode to open a file in range selection

License

MIT