Hi Tim,
Thanks for your reply.
Lines are as such

[2011-03-21T18:45:46.004-07:00] [Other info]... log message
[2011-03-21T18:45:46.008-07:00] [Other info]... log message
[2011-03-21T18:45:46.607-07:00] [Other info]... log message

I would like to fold based on each part of the timestamp Year, month, date,
hour, min, second. I read the documentation, but am still not sure how to
write the foldexpr..

Thanks,
cb

On Sun, Mar 20, 2011 at 5:23 PM, Tim Chase <[email protected]> wrote:

> On 03/20/2011 12:19 PM, sanjay ravat wrote:
>
>> I am relatively new to vim. I need to inspect log files that
>> run into thousands of lines. Each line starts with a
>> timestamp. How can I fold the logs based on timestamp?
>>
>
> It would help to have (1) an excerpt of the log-file (possibly redacted,
> leaving at least the date information) to show the date-format, and (2) what
> you expect to fold by (year? day? hour? minute? second?).  As a starting
> point, you'll want to
>
>  :set foldmethod=expr
>  :set foldexpr=magic_expression_derived_from_info_you_provide
>
> You can read up at
>
>  :help 'foldmethod'
>  :help 'foldexpr'
>
> -tim
>
>
>
>

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