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