My colleague uses a terrible source code editor that leaves strange comments throughout the code. In Visual Studio, I created a macro that simply stacks all these comment blocks, so I don't need to see them.
Now I would like to do the same in vim.
This regular expression matches each of these blocks:
/^.*\/\* EasyCODE.*\(\(\n.*\*\/\)\|\(\n.*\/\*.*\)\|\(\n\/\/.*\)\)*/
Now I'm sure there is a really good way to reset all matches of this pattern in vim. However, I'm pretty new to vim and don't know how to do this.
could you help me?
Edit: a few examples:
These comment blocks always begin with /* EasyCODE. Sometimes a comment has a closure */on the right at the end of the first line, sometimes only on the next line. The following lines may or may not contain additional " /* EasyCODE..." blocks .
One of these blocks might look like this:
or how is it
or how is it
As I said, the above regular expression catches them all.
source
share