Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Latest commit

 

History

History
23 lines (16 loc) · 791 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 791 Bytes

based.nvim

based.nvim is a Neovim plugin for quickly converting buffer text to/from hex.

Demo

Screen.Recording.2022-12-17.at.10.15.19.mov

Example configuration

local based = require("based")

-- Not necessary if you don't want to override any defaults.
-- `:help based` for information on configuration keys
based.setup({
    highlight = "MyHighlightGroup"
})

vim.api.nvim_set_keybind({ "n", "v" }, "<C-b>", based.convert)                            -- Try to detect base and convert
vim.api.nvim_set_keybind({ "n", "v" }, "<leader>Bh", function() based.convert("hex") end) -- Convert from hex
vim.api.nvim_set_keybind({ "n", "v" }, "<leader>Bd", function() based.convert("dec") end) -- Convert from decimal