$convenio = formata_numero($dadosboleto["convenio"],6,0,"convenio");
if ($dadosboleto["formatacao_nosso_numero"] == "1") {
$nossonumero = formata_numero($dadosboleto["nosso_numero"],5,0);
$dv = modulo_11("$codigobanco$nummoeda$fator_vencimento$valor$convenio$nossonumero$agencia$conta$carteira");
$linha = "$codigobanco$nummoeda$dv$fator_vencimento$valor$convenio$nossonumero$agencia$conta$carteira";
$nossonumero = $convenio . $nossonumero ."-". modulo_11($convenio.$nossonumero);
}
if ($dadosboleto["formatacao_nosso_numero"] == "2") {
$nservico = "21";
$nossonumero = formata_numero($dadosboleto["nosso_numero"],17,0);
$dv = modulo_11("$codigobanco$nummoeda$fator_vencimento$valor$convenio$nossonumero$nservico");
$linha = "$codigobanco$nummoeda$dv$fator_vencimento$valor$convenio$nossonumero$nservico";
}
Go to the first line and press (this will make you enter into Vim visual block mode) and then you can just go down until you reach the number of lines that you want to comment. For this example let's make all this code right here, so let's press 15j. Finally, you can press c, put "//" and press Esc key to quit visual block mode. All this code is commented :D
Keystrokes in sequence: <Ctrl-v>15jc//<Esc>