Skip to content

andi242/gitopen.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

gitopen.nvim

Check and open the git url in the default web browser.

The plugin grabs the output of git ls-remote --get-url in the current workdir,
checks if ssh or plain http, reformats if necessary and opens the URL in the browser.
Should work with any git hoster (codeberg, github, self hosted, ...).

If the current workdir is not a git repo, it only prints a message.

Installation

lazy.nvim

return {
  'andi242/gitopen.nvim',
  event = "VeryLazy",
  config = function()
    require('gitopen').setup()
  end,
  keys = {
    { '<leader>go', '<cmd>GitOpen<cr>', desc = 'open git url in browser' },
  },
},

Disclaimer

I can only test this in Linux, so not sure if the code to handle other OS' is correct.

About

open git url from current project in browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages