/*对于C风格的注释可以使用如下命令*/
:%s/\_s*\/\*\(\S\|\_s\)\{-}\*\///g
//对于C++风格注释
%s/\/\/.*//g
/*...*/ -> //... (仅限单行)
:%s/\/\*\(\(\S\|\_s\)\{-}\)\*\//\/\/\1/g
//... -> /*...*/(仅限单行)
%s/\/\/\(.*\)/\/\*\1\*\//g
原文地址:https://www.cnblogs.com/Gster/p/9240001.html
时间: 2024-11-06 03:53:25