Vim 统计(利用自身替换的副作用)

#### 统计单词数、行数等 *count-items*

:%s/./&/gn 字符数

:%s/\i\+/&/gn 单词数

:%s/^//n 行数

:%s/the/&/gn 任何地方出现的 "the"

原文地址:https://www.cnblogs.com/Akagi201/p/2437202.html