VIM Commands 2 Posted on 2015-10-19 | In Vim | 统计字符串出现次数:# 统计string的出现次数,string可以使用正则表达式 :%s/string/&/gn 回车 :%s/\([01]\d\|2[01234]\)\d master\s-\s*\(\d*\s*)*connected\s*\d\+-\d\+/&/gn