Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/trmckay/based.nvim
Neovim plugin to convert numberical base of selection or current word
https://github.com/trmckay/based.nvim
neovim
Last synced: 21 days ago
JSON representation
Neovim plugin to convert numberical base of selection or current word
- Host: GitHub
- URL: https://github.com/trmckay/based.nvim
- Owner: trmckay
- License: mit
- Created: 2022-12-14T06:23:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-03T18:15:55.000Z (about 1 year ago)
- Last Synced: 2024-10-12T06:22:37.331Z (about 1 month ago)
- Topics: neovim
- Language: Lua
- Homepage:
- Size: 15.6 KB
- Stars: 22
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# based.nvim
based.nvim is a Neovim plugin for quickly converting buffer text to/from hex.
## Demo
https://user-images.githubusercontent.com/43476566/208255795-f4f5e50a-bfff-4b5b-bb37-2b836bdd2005.mov
## Example configuration
```lua
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" }, "", based.convert) -- Try to detect base and convert
vim.api.nvim_set_keybind({ "n", "v" }, "Bh", function() based.convert("hex") end) -- Convert from hex
vim.api.nvim_set_keybind({ "n", "v" }, "Bd", function() based.convert("dec") end) -- Convert from decimal
```