Hi Ben, On Sunday, February 6, 2011 12:02:08 AM UTC+1, Ben Fritz wrote:
I think this will not work for the second part claimed by the comment > in the code posted: "The pattern may extend over multiple lines." > > For example, > > abc > def > ghi > > :g/abcc\ndef/d > >> >> will delete only "abc", it will not delete "def". > True! :-( > > I'm not sure how important this is to the OP... Very important :-) The Kindle stores all book clippings in a text file, in this typical way: ==BEGIN QUOTING FROM KINDLE== The Curse of the Self: Self-Awareness, Egotism, and the Quality of Human Life (Mark R. Leary) - Highlight Loc. 21 | Added on Tuesday, November 23, 2010, 08:10 PM The inherently egocentric and egotistical manner in which the self processes information can blind people to their own shortcomings and undermine their relationships with others. ========== The Curse of the Self: Self-Awareness, Egotism, and the Quality of Human Life (Mark R. Leary) - Highlight Loc. 24 | Added on Tuesday, November 23, 2010, 08:11 PM And, ironically, using self-reflection to help us deliberately control our own behavior can often backfire and create more problems than it solves. ========== Capitalism (Ayn Rand) - Highlight Loc. 9-10 | Added on Wednesday, December 22, 2010, 08:24 PM I want to stress that our primary interest is not politics or economics as such, but "man's nature and man's relationship to existence"—and that we advocate capitalism because it is the only system geared to the life of a rational being. ========== The Curse of the Self: Self-Awareness, Egotism, and the Quality of Human Life (Mark R. Leary) - Highlight Loc. 27-28 | Added on Tuesday, November 23, 2010, 10:24 PM This book will explain how and why our natural tendency to talk to ourselves, see the world egocentrically, defend our egos, seek self-validation, and engage in other acts of selfhood often works against our best interests. ========== ==END QUOTING FROM KINDLE== With the 'CopyMatchingLines' function I've reported before, I can easily collect all the citations belonging to the book I've just read, and copy them to an independent text file. What I'd like to do next is delete them from the original kindle text. I was happy with Javier's suggestion but, as you indicate, it only deletes the first line. I'm going to try Tim's and Zyx's approach. Thank you very much to all four! -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
