número de ocurrencias de una palabra en una parte del archivo en vim
Frecuentes
Visto 80 veces
1 Respuestas
3
Try this for counting
:21,234s/asd//gn
Editar
Since your vim is so old, try greping and count like
sed -n 21,234p filename | grep -o asd | wc -l
Respondido el 11 de junio de 12 a las 20:06
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas search vim or haz tu propia pregunta.
are you adding a
/
at the end? I've just tested and it is working, make sure you are copying it the exact way - eric fortisI am not sure why but giving //gn in the end as mentioned is giving that error! I have tried :21,234s/asd/&/g or :21,234s/asd/asd/g and they are giving the correct count though the file will be shown as modified. I am using vim 6.3 version. - silentNinJa
cant help! its the version installed in my company servers!! thanks for the help :) - silentNinJa