Skip to main content

Need to quickly comment out every line matching a pattern in vim? Here's an example on how to comment out every line matching `console.log` :

:g/console.log/norm 0i//

@MasteringVim