8 later thoughts
sed can be used to replace regex-defined sections of text in a file with random number like this.
sed
The solution in the answer linked utilizes the concepts of “hold space” and “pattern space” in sed. This answer goes over them in detail.
4 earlier thoughts
Keyboard navigation
?
c
g
j
←
k
→
p
s
ctrl + enter
alt + enter
esc