Skip to content

Neovim plugin to convert numberical base of selection or current word

License

Notifications You must be signed in to change notification settings

trmckay/based.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Neovim plugin to convert numberical base of selection or current word

Topics

Resources

License

Stars

Watchers

Forks

Languages