multi-line comment with vi

Vi editor is one of my favourite text editor to work with under linux/Unix systems ,
and from time to time there comes a need to mark multiple lines as comment .
here is how you can do it in vi/vim :

1. using Ctrl+v (visual block) mark the lines you wish to comment

2. go into insert mode Shift+i then write the comment (could be anything actually )

3. finished by clicking the Esc button .

and vwalla you lines are now marked as comment

to remove multi-line comment ,simply go through the same steps but
after marking the lines just press d for delete or c for clean

Posted in Tips and Tricks Tagged with: , ,