Welcome!
If you've stumbled upon this plugin, chances are you don't need it. randomize.nvim
was created to address a simple yet annoying problem: generating mock data to test a REST API.
While a quick script might work for single use cases, I needed a solution that could speed up the data generation on different CSV
files with varying numbers of columns and diverse values requirements. Relying on scripts would have meant cluttering them with numerous if statements to account for all the variations, making the process cumbersome and error-prone.
This plugin provides an easy way to generate random values directly within Neovim, giving you fine control over the data to ensure it's both random and meaningful.
Using lazy.nvim:
{
"simone-lungarella/randomize.nvim",
config = function()
require("randomize").setup()
end,
}
Using packer.nvim:
use({
"simone-lungarella/randomize.nvim",
config = function()
require("randomize").setup()
end,
})
- Select content in different lines in Visual mode;
- Run
:RandomizeBetween <min> <max>
; - The function will replace selected content with random numbers in choosen range.
random-numbers.mp4
- Select content in different lines in Visual mode;
- Run
:RandomizeDateBetween <yyyy-MM-dd> <yyyy-MM-dd>
; - The function will replace selected content with random dates in choosen range.
random-dates.mp4
This plugin is licensed under the MIT License.