On Fri, Mar 18, 2011 at 8:49 PM, Rostyslaw Lewyckyj <[email protected]>wrote:

> Malte Forkel wrote:
>
>> Am 18.03.2011 18:13, schrieb Ben Fritz:
>>
>>
>>> Probably not a built-in way, unless they are similar enough to diff.
>>>
>>> Actually you may be able to play with Vim's diffexpr to allow this to
>>> work, but you probably won't be able to rely on the normal external
>>> diff tool unless the logs are very similar.
>>>
>>>
>>>
>> Unfortenately, the logs are very different.
>>
>> Would it be possible to write a script that is triggered by scrolling
>> one windows and then scrolls the connected (bound) windows? Given the
>> amount scrolled (in terms of number of lines) and the time interval now
>> shown (timestamps of first and last line shown), the script should be
>> able to determine the new top (or bottom, depending on scroll direction)
>> line in all connected windows, based on the timestamps in those files
>> and compute the necessary scroll offset (in terms auf number lines) for
>> those windows.
>>
>> Are the hooks and the information required to do this availabe in/from
>> vim?
>>
>>
>>
> How is time indicated in each of the two (log) files?
> Is each of the lines time stamped i.e. labeled   e.g.
>  yyyy:mm:dd:hh:mm:ss.ssss?
> If so then after scrolling log1, place the new start line at the top of the
> window,
> extract its' time stamp, move to log2, search for the time stamp, move the
> line (in log2) to the top of its window.
> If the number of lines in a given interval is different in the two logs
> then,
> of course, that will show up in the displays
>
>
I think maybe you can use a script to do this:
for example, get the time of the first line of the current window, and
search this time on the other window, and let the first result display at
the first line of the window.

I don't know how to write this script, I hope someone else can do it.

-- 
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

Reply via email to