I thought it would be handy to create a mapping that would turn the current line or visually selected line into a comment banner.
Something like this:
This is the description of the usage of the class
would become, after pressing a shortcut:
/*----------------------------------------------------*/
/* This is the description of the usage of the class */
/*----------------------------------------------------*/
I have this line in my
~/.vimrcthat does exactly what you want:Place your cursor on a line, press
<leader>g, done.The default
<leader>is\, so that would be\g.You can, obviously, use any shortcut you want.