I have a very large table covering many pages in a document. The same footnote appears under the table on every page and I want to strip the entire document of these lines so I'm left only with the table. Imagine there are 3 footnotes like this:
This is a footnote
Another footnote
Yet another footnote
It seems I can delete the first footnote with :g/^T/d
, and delete the 2nd with :g/^A/d
, etc. But is there some way to tell vim to delete any line starting with T
or A
or Y
in a single command?
It might seem unwise to run the command above over the entire document but the table is full of numbers and I know there are no other lines beginning with a letter aside from those in the footnote.
I checked the vim book by Robbins, Hannab & Lamb and couldnt see that it was possible. Can I assume an experienced vim user would simply type :
and then use the arrow keys to recall the previous command and change the one letter, and repeat this for the number of lines in the footnote?
:<up>
to change a single letter for every single footnote line :) In fact, if you know they all have a format like1.
, you can do something like:global/^\d\. /delete