🔎 urlview.nvim
Find and display URLs from a variety of search contexts
- Finds URLs from a variety of search contexts (e.g. from a buffer, file, plugin URLs)
- Displays these URLs in a picker, such as the built-in
vim.ui.select
or telescope.nvim - Performs actions on selected URLs, such as navigating to the URL in your preferred browser, or copying the link to your clipboard
- Easily visualise all the URLs in a buffer or file (e.g. links in your Markdown documents)
- Quickly accessing repo webpages for installed Neovim plugins (life-saver for config updates or browsing plugin documentation)
- Ability to register custom searchers (e.g. Jira ticket numbers), pickers and actions (please see docs or
:h urlview.search-custom
) - Jumping to the previous or next URL in the active buffer (and opening the URL in your browser)
Please note that currently, this plugin only detects URLs beginning with a
http(s)
orwww
prefix for buffer and file search, but there are plans to support a more general pattern (see🗺️ Roadmap).
📸 Screenshots
📋 Buffer Links
:UrlView
or :UrlView buffer
🔌 Plugin Links
:UrlView lazy
, :UrlView packer
, or :UrlView vimplug
depending on your plugin manager of choice
⚡ Requirements
- This plugin supports Neovim v0.7 or later.
- Please find the appropriate *-compat Git tag if you need legacy support for previous Neovim versions, such as v0.6-compat for nvim v0.6, although these versions will no longer receive any new updates or features.
- For Neovim versions prior to v0.6 or Vanilla Vim support, please check out urlview.vim as an alternative plugin.
🚀 Usage
Searching contexts
- Use the command
:UrlView
to see all the URLs in the current buffer.
-
For your convenience, feel free to setup a keybind for this using
vim.keymap.set
:vim.keymap.set("n", "\\u", "<Cmd>UrlView<CR>", { desc = "View buffer URLs" }) vim.keymap.set("n", "\\U", "<Cmd>UrlView packer<CR>", { desc = "View Packer plugin URLs" })
-
You can also hit
:UrlView <tab>
to see additional contexts that you can search from- e.g.
:UrlView packer
to view links for installed packer.nvim plugins
- e.g.
- You can optionally select a link to bring it up in your browser.
Buffer URL navigation
- You can use
[u
and]u
(default bindings) to jump to the previous and next URL in the buffer respectively. - If desired, you can now press
gx
to open the URL under the cursor in your browser, with netrw. - This keymap can be altered under the
jump
config option.
📦 Installation
Install this plugin with your package manager of choice. You can lazy load this plugin by the UrlView
command if desired.
use("axieax/urlview.nvim")
"axieax/urlview.nvim"
⚙️ Configuration
This plugin supports plug-n-play, meaning you can get it up and running without any additional setup.
However, you can customise the default options using the setup
function:
require("urlview").setup({
-- custom configuration options --
})
Please check out the documentation for configuration options and details.
🎨 Pickers
✔️ Native (vim.ui.select)
You can customise the appearance of vim.ui.select
with plugins such as dressing.nvim and telescope-ui-select.nvim. In the demo images above, I used dressing.nvim's Telescope option, which allows me to further filter and fuzzy search through my entries.
🔭 Telescope
- Optional picker option
- Additional requirements (only if you're using this picker): telescope.nvim
- You can use Telescope as your
default_picker
using therequire("urlview").setup
function - Alternatively, you can specify a picker dynamically with
:UrlView <ctx> picker=telescope
🚧 Stay Updated
More features are continually being added to this plugin (see
It is recommended to subscribe to the