Pregunta

Say I've got this:

    \item[1]\footnote{«footnote blah blah»}
footnote blah blah.
    \item[2]\footnote{«blah blah footnote»}
random text
    \item[3]\footnote{«this is not»}
more random text

I want to quickly delete \footnote{*} (that includes \footnote{«footnote blah blah»} \footnote{«blah blah footnote»} and \footnote{«this is not»}, but not \item[x] or the lines below that. How is this achieved?

Thanks!

¿Fue útil?

Solución

I think the most accurate way would be to use:

:%s/\\footnote{.\{-}}//g

This will delete footnote and everything in between the braces. Using {.*} will delete everything up to the last brace even if it is outside of the footnote brace.

Otros consejos

In escape mode

:1,$s/\\footnote{.*}//g
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top