开发者

Possible to add spacing every 4 characters in vi?

Is it possible to add spacing every 4 characters 开发者_Go百科in vi? And if it is, what's a good google term to search for to learn how to do similar stuff?


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 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜