Home

Awesome

Nibbler

Nibbler is a NeoVim plugin that allows you to convert numbers between binary, decimal, and hexadecimal formats quickly and easily. It also provides a convenient command to toggle between the different number formats.

This plugin was developed with multiple objectives: to explore the potential of AI-assisted code development, gain hands-on experience in creating neovim plugins and their practical applications, learn the basics of the Lua programming language, and cater to the specific needs of embedded programming.

Features

Installation & Configuration

lazy.nvim

You can install and configure the plugin using the following options in your plugins.lua file.

{
    'skosulor/nibbler',
    config = function()
        require('nibbler').setup ({
            display_enabled = true, -- Set to false to disable real-time display (default: true)
        })
    end
}

Usage

Have the cursor over a number an call one of the following commands:

FunctionDescription
NibblerToHexConvert number under cursor/highlighted to hexadecimal
NibblerToBinConvert number under cursor/highlighted to binary
NibblerToDecConvert number under cursor/highlighted to decimal
NibblerToggleToggle between binary, decimal, and hexadecimal
NibblerToggleDisplayToggle virtual text showing decimal value of hex or bin number
NibblerToCArrayConvert number under cursor/highlighted to a C-Style array of bytes
NibblerHexStringToCArrayConvert a hexadecimal string to a C-style array of bytes