β¨ UrlView is an extensible plugin for the Neovim text editor which essentially:
vim.ui.select
or telescope.nvimπ― Additional features and example use cases include:
:h urlview.search-custom
)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).
:UrlView
or :UrlView buffer
:UrlView lazy
, :UrlView packer
, or :UrlView vimplug
depending on your plugin manager of choice
: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
:UrlView packer
to view links for installed packer.nvim plugins[u
and ]u
(default bindings) to jump to the previous and next URL in the buffer respectively.gx
to open the URL under the cursor in your browser, with netrw.jump
config option.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"
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.
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.
default_picker
using the require("urlview").setup
function:UrlView <ctx> picker=telescope
More features are continually being added to this plugin (see πΊοΈ Roadmap). Feel free to file an issue or create a PR for any features / fixes :)
It is recommended to subscribe to the π Breaking Changes thread to be updated on potentially breaking changes to this plugin, as well as resolution strategies.