Re: Substitute pattern over multiple lines

2020-12-24 Thread John Cordes
On Wed, Dec 23, 2020 at 10:52:43PM -0600, Tim Chase wrote: > On 2020-12-23 22:34, John Cordes wrote: > > :g/^2 TYPE tngnote//2 NOTE /s/^2 NOTE \zs\(.*\n\(\%(\D\|3 CONC > > \).*\n\)\+\)/\=' > class="xxx">'.substitute(substitute(submatch(1), '\n3 CONC ', '', > > 'g'), '\n', '', 'g')."<\/div>\n" > > >

Re: Substitute pattern over multiple lines

2020-12-24 Thread Steve Litt
On Wed, 23 Dec 2020 17:08:32 -0600 Tim Chase wrote: > 2 NOTE \zs > > This does join *all* the lines and doesn't re-wrap them, so you'd > then want a second pass to do the wrapping > > :set tw=70 > :g/]*>.*<\/div>$/norm gqq His destination is HTML so he doesn't need to wrap them: The bro

Re: Substitute pattern over multiple lines

2020-12-24 Thread Steve Litt
On Wed, 23 Dec 2020 21:16:20 -0400 John Cordes wrote: > One big problem with the first part is that I *only* want to > concatenate the continuation lines when they appear immediately > following a "2 NOTE..." tag, AND that "2 NOTE" tag must be either the > next or next but one line after "2 TYP

Re: Substitute pattern over multiple lines

2020-12-24 Thread John Cordes
On Thu, Dec 24, 2020 at 3:43 PM Steve Litt wrote: > On Wed, 23 Dec 2020 17:08:32 -0600 > Tim Chase wrote: > > > > 2 NOTE \zs > > > > This does join *all* the lines and doesn't re-wrap them, so you'd > > then want a second pass to do the wrapping > > > > :set tw=70 > > :g/]*>.*<\/div>$/norm

Re: Substitute pattern over multiple lines

2020-12-24 Thread Tim Chase
On 2020-12-24 14:43, Steve Litt wrote: > On Wed, 23 Dec 2020 17:08:32 -0600 > Tim Chase wrote: >> 2 NOTE \zs >> >> This does join *all* the lines and doesn't re-wrap them, so you'd >> then want a second pass to do the wrapping >> >> :set tw=70 >> :g/]*>.*<\/div>$/norm gqq > > His destin

Re: Substitute pattern over multiple lines

2020-12-24 Thread jcordes
On Thursday, 24 December 2020 at 16:01:35 UTC-4 stevelitt wrote: > On Wed, 23 Dec 2020 21:16:20 -0400 > John Cordes wrote: > > > > One big problem with the first part is that I *only* want to > > concatenate the continuation lines when they appear immediately > > following a "2 NOTE..." tag

complex-repeat Behavior Changed Recently

2020-12-24 Thread 'JB' via vim_use
Hi Vim, Typing 'qa0xxj' and executing macro 'a' used to go to the beginning of the line, delete the first two chars, then jump down one line. Now, the cursor goes to the beginning of the line and execution of the macro stops -- no deletions or jumping down one line. The same when using '^' or '$