I want to generate 10 random numbers in the buffer.
In Emacs I would do:
<start macro>(random limit) <eval lisp><newline><end macro>
to define the macro,
and 9 <execute macro>
to generate it 10 times.
Is there a way I can do this in vim?
There are two main methods that a computer generates a random number: true random number generators (TRNGs) and pseudo-random number generators (PRNGs). The former uses some phenomenon outside the computer for its number generation, whereas the latter relies on pre-set algorithms to emulate randomness².
is this ok for you?
:r! echo $RANDOM
then
9@:
if you have certain programming language env available on your OS, you can eval those statement too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With