A wastebin plugin to paste the current buffer or selection.
Use your preferred package manage, for example Lazy.nvim:
return {
{
"matze/wastebin.nvim",
config = true,
}
}
Either set the wastebin URL as WASTEBIN_URL
environment variable or pass it to
the setup function
require("wastebin").setup({
url = "https://foo.bar.com",
})
The plugin comes with the following defaults:
{
-- URL of wastebin service to POST pastes to
url = vim.env.WASTEBIN_URL,
-- Shell command to POST the content
post_cmd = "curl -s -H 'Content-Type: application/json' --data-binary @- ",
-- Shell command to open URLs
open_cmd = "open",
}
To paste the entire buffer or a selection call
:WastePaste
and
:'<,'>WastePaste
respectively.