On Wed, Nov 29, 2006 at 10:53:43AM +0800, Quinn Li wrote: > sed会不会有这样的参数? > > 我一般是用 vim 做这个工作 > > vim *.html > > 然后在命令模式输入冒号,后面跟上这个命令 > > : argdo % s/xxxxx/sssss/ge | update > > (指的是对于所有*.html,执行替换,并且存盘) > > 然后退出vim >
有没有办法使得可以替换多行内容,比如将一个 C++ 语言源文件中的所有注释 全部去掉,对于 // 开始的注释比较好处理,但对于 /* xxx */ 这种注释就比 较麻烦了。 ------------------------ -- When I was younger, I could remember anything, whether it had happened or not; but my faculties are decaying now and soon I shall be so I cannot remember any but the things that never happened. It is sad to go to pieces like this but we all have to do it. -- Mark Twain