I want to remove a multi line comment in vim:

 * Factory for creating [MainViewModel]
 * @param arg the repository to pass to [MainViewModel]

I tried


but it doesn't work for multiple lines and


removes whole content inside First comment's beginning and last comment's ending.


This works:


\_ includes newlines in the following character set.

{-} instead of * tells vim to be non-greedy in matching.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.