A simple Neovim plugin to open selected text as URLs in your browser.
- Open selected URLs directly in your browser
Using lazy.nvim:
{
'brunocroh/open-link.nvim',
config = function()
require('open-link').setup({
browserCmd = { '/usr/bin/open', '-a', '/Applications/Firefox.app/' }
})
-- Map open link to comando <leader>go in visual mode
vim.keymap.set({ "v" }, "<leader>go", "<cmd>OpenLink<cr>", { desc = "Open link in the browser" })
end
}
Using packer.nvim:
use {
'brunocroh/open-link.nvim',
config = function()
require('open-link').setup()
end
}
- Enter visual mode and select text/URL
- Press
<leader>go
(or your configured keybinding) - The selected text will open in Google Chrome
- Neovim 0.5 or higher
- Google Chrome installed
- MacOS (currently only supports MacOS)
MIT