2009-03-15 11 views

Respuesta

12
:%s/<?//ng 

Ver :h count-items.

+0

me sale el mensaje de error " Personajes finales ". Probé el código con ": set report = 0" también. –

+0

Lo intentaría de nuevo, la ayuda para Trailing Characters describe "Se ha agregado un argumento a un comando Ex que no permite uno". – RedBlueThing

+0

@Cannonade: El mismo error nuevamente con el código E488. –

9

Count-items describe lo que está buscando.

:%s/<?/whatever/ng 

Este es el comando de sustitución, pero el indicador n evita la sustitución real.

1
:help count-items 

En VIM 6.3, así es como usted lo haría:

:set report=0 
:%s/<?/&/g # returns the count without substitution 

En VIM 7.2, así es como usted lo haría:

:%s/<?/&/gn # returns the count without substitution 
Cuestiones relacionadas