convy.nvim prompts an interactive Formats selection window when fed no arguments
Check the full docs at convy.nvim
✨ Features
🔄 Convert between multiple formats: ASCII, base64, bin, decimal, hex, octal
🤖 Auto-detection of input format
🎯 Smart selection: works with visual selection or word-under-cursor
🎨 Interactive floating window UI for format selection
🚀 Usage
Let’s say you need to convert the following from DEC to ASCII: 72,101,108,108,111
Using vim’s substitute you’d have to select the numbers and execute the following in cmdline:
:'<,'>s/\%V\v(\d+)[,s]*/\=nr2char(submatch(1))/g
Good luck remembering that!
With convy.nvim I can simply do <leader>ca, which yo…
convy.nvim prompts an interactive Formats selection window when fed no arguments
Check the full docs at convy.nvim
✨ Features
🔄 Convert between multiple formats: ASCII, base64, bin, decimal, hex, octal
🤖 Auto-detection of input format
🎯 Smart selection: works with visual selection or word-under-cursor
🎨 Interactive floating window UI for format selection
🚀 Usage
Let’s say you need to convert the following from DEC to ASCII: 72,101,108,108,111
Using vim’s substitute you’d have to select the numbers and execute the following in cmdline:
:'<,'>s/\%V\v(\d+)[,s]*/\=nr2char(submatch(1))/g
Good luck remembering that!
With convy.nvim I can simply do <leader>ca, which you can set to any of these:
:Convy auto ascii
:lua require("convy").convert("auto", "ascii", true)
:Convy # opens an interactive selection menu
🏆 Roadmap
[ ] Drop visual-mode flag for util.function that guesses if we
executed Convy in visual mode
[ ] Colors (RGB, HSL, ...)
[ ] Sizes (px, mm, in, ...)
[ ] Temperatures (C, F, ...)
[x] Interactive UI for selecting input/output formats
[x] Tab completion for conversion formats
[x] Automatic format detection
This is my very first Neovim plugin, I created it because I’ve come across various situations where I’d need to convert something to another format but the existing Neovim plugins wouldn’t be up to the task (format missing, unable to use visual selection range, cmdline-only, format X converts to Y but not Z, etc ...), and using vim’s substitute would be too much of a tedious task.
I also created this because I wanted to learn how to create Neovim plugins, and I hope I did it right. Please don’t hesitate to contribute or give me tips.