-- -- 50-transform_text.lua -- -- * Transforms the visual selection in place via dotfiles.selection (URL-encode / URL-decode). -- -- Keymaps: -- `tte`: URL-encode selection -- `ttd`: URL-decode selection -- local selection = require("dotfiles.selection") -- URL-encode the visual selection. local function url_encode_selection() selection.transform(vim.uri_encode) end -- URL-decode the visual selection. local function url_decode_selection() selection.transform(vim.uri_decode) end vim.keymap.set("x", "tte", url_encode_selection, { desc = "URL-encode selection" }) vim.keymap.set("x", "ttd", url_decode_selection, { desc = "URL-decode selection" })