- Trozo is a Neovim plugin that allows you to easily upload selected text or the entire file to `paste.rs` and retrieve a shareable URL. It is designed to be simple and work out of the box.
- Upload selected text to
paste.rs
directly from Neovim. - Upload the entire file to
paste.rs
. - Automatically open the resulting URL in your default web browser.
- Option to copy the URL to the clipboard.
- cURL must be installed on your system.
Trozo aims to work well without configuration, but it does offer a couple of options for those who want them:
require('trozo').setup({
browser = true, -- Automatically open the URL in the default web browser
clipboard = false, -- Copy the URL to the clipboard
})
use {
'dfendr/trozo.nvim',
config = function()
require('trozo').setup()
end
}
return {
{
"dfendr/trozo.nvim",
config = true,
cmd = {"TrozoUploadSelection", "TrozoUploadFile"}
},
}
Command | Action |
---|---|
TrozoUpload | Uploads the selected text to paste.rs. |
TrozoUploadFile | Uploads the entire file to paste.rs. |
local status_ok, which_key = pcall(require, "which-key")
if not status_ok then
return
end
local xmappings = {
s = {
":'<,'>TrozoUploadSelection<CR>",
"Upload V-Selection To paste.rs",
},
S = {
":TrozoUploadFile<CR>",
"Upload File To paste.rs",
},
}
local xopts = {
mode = "x", -- VISUAL mode
prefix = "<leader>",
buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings
silent = true,
noremap = true,
nowait = true,
}
which_key.register(xmappings, xopts)
paste.rs is heavily rate limited. You may find that some selections aren't being fully uploaded. If this is the case, wait a few minutes before trying to upload again.