Is it possible to add spacing every 4 characters in vi? And if it is, what's a good google term to search for to learn how to do similar stuff?
vim Inserting text Insert text into multiple lines at once Press Ctrl + v to enter into visual block mode. Use ↑ / ↓ / j / k to select multiple lines. Press Shift + i and start typing what you want. After you press Esc , the text will be inserted into all the lines you selected.
To add a space every 4 characters you could use the following command (at least in VIM):
:%s/\(....\)/\1 /g
If you Google "VIM Substitution" you should end up with some useful examples.
Example:
To add a space every 4 characters you could use
becomes
To a dd a spa ce e very 4 c hara cter s yo u co uld use
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