问题
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?
回答1:
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
来源:https://stackoverflow.com/questions/4847845/possible-to-add-spacing-every-4-characters-in-vi