New answers tagged


I think the fastest would be using the commentary plugin as Maxim Kim mentioned: just type gc since you already have the lines selected. But if you want another option using vanilla vim, you could try using regex substitution: :s&^&// You can use other characters instead of &; I used that one because it's next to ^ on my keyboard. I use it ...


You can try this: vip<Ctrl-v>I//<ESC> vip select paragraph <Ctrl-v> make selection blockwise I// insert // into begining of a selection block PS: I would suggest to use vim-commentary plugin from Tim Pope where it would be simple gcip.

Top 50 recent answers are included