On 2020-06-30 18:33, Chris Jones wrote:
> On Mon, Jun 29, 2020 at 03:34:03PM EDT, Tim Chase wrote:
>> Try changing that line from
>>
>> $?^$?+,$g/^\[\@!.*\n\[\@!/,/\n\[\|\%$/j
>>
>> to
>>
>> $?^$?+,$g/^\[\@!.*\n\[\@!./,/\n\[\|\%$/j
>
> This indeed fixes the problem.
Great!
> Still
On Mon, Jun 29, 2020 at 03:34:03PM EDT, Tim Chase wrote:
> Try changing that line from
>
> $?^$?+,$g/^\[\@!.*\n\[\@!/,/\n\[\|\%$/j
>
> to
>
> $?^$?+,$g/^\[\@!.*\n\[\@!./,/\n\[\|\%$/j
This indeed fixes the problem.
Still trying to wrap my head around this bizarre
[sorry for the belated reply.]
On 2020-06-27 22:46, Chris Jones wrote:
> Not sure if it's some kind of corner case or this little
> experimented has unearthed a bug in Vim's regex logic...
Not a bug in the regex parser. See further diagnosis:
> On Mon, Jun 22, 2020 at 09:40:38PM EDT, Tim
On Mon, Jun 22, 2020 at 09:40:38PM EDT, Tim Chase wrote:
>
> function! Unfootnote()
> " make all the footnotes on one line
> $?^$?+,$g/^\[\@!.*\n\[\@!/,/\n\[\|\%$/j
> " gather the footnotes into b:a
> let b:a={}
> $?^$?,$g/\[\d\+\]/let b:a[getline('.')]=getline(line(".")+1)
On Mon, Jun 22, 2020 at 09:40:38PM EDT, Tim Chase wrote:
Sorry for the delay... needed time for this to sink in (and test)
> In this case because each of the commands involves the :g command, it
> becomes a bit trickier. I'd likely define a function something like
>
> function! Unfootnote()
On 2020-06-22 20:16, Chris Jones wrote:
> Congrats! Works out of the box and does exactly what I had in mind
Great!
> copy-pasted the commands and the result is spectacular. The clever
> idea is to use the :g(lobal) command to build the array.
I do love the power of the :g command and abuse it
Congrats! Works out of the box and does exactly what I had in mind:
copy-pasted the commands and the result is spectacular. The clever idea
is to use the :g(lobal) command to build the array.
I posted a little too fast and left out an important third³ footnote at
the bottom of my message...
On 2020-06-21 18:57, Tim Chase wrote:
> To build this associative array, you might try
>
> :$?^$?,$g/\[\d\+\]/let b:a[getline('.')]=getline(line(".")+1)
Whoops, before you do this, you might have to let vim know that b:a
is an array:
:let b:a={}
:$?^$?,$g/\[\d\+\]/let