Comment-out printks with Vim

tux_vim_logo_1

This post shows how to comment out all the printks in Vim.

The following command will put /* and */ around all printks (in all lines), after getting confirmation on each replacement

:%s/\(printk(.*);\)/\/* \1 *\//gc

References