Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim - navigate simultaneously through multiple files with timestamps

Tags:

vim

timestamp

I often have to deal with reading two or three files with logs. The logs are produced by different processes and have different levels of verbosity (thus different number of lines), but lines in all of them start with a timestamp.

I thought about writing some vim script, that would allow me to open those files simultaneously, and then automatically navigate via timestamp - i.e. when moving down in one file, the other ones will be centered on lines with relevant timestamp.

Does anyone have any ideas about the realization of such task? Any suggestions about commands and tricks that could be useful?

like image 624
Paweł Rumian Avatar asked Nov 20 '25 03:11

Paweł Rumian


1 Answers

I have implemented such in my LogViewer plugin; hopefully it'll suit your needs.

screenshot
(source: ingo-karkat.de)

like image 183
Ingo Karkat Avatar answered Nov 22 '25 19:11

Ingo Karkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!