Hello, I'm using Vim's QuickFix capabilities to display errors from a log file. When an error occurs, I press a hotkey, and an external script is run using cexpr system(~/myscript). Vim reads the output from ~/myscript, and loads the QuickFix window.
The catch is that I see the same errors again and again, because ~/myscript reads the entire log file each time I press the hotkey. Here's the behavior I want: 1) When an error occurs, I press a hotkey and Vim shows it to me. 2) If I press the hotkey again, then Vim only shows me the errors that have occurred since the last time I pressed the hotkey I have a klunky method of doing this now, which is to track the last-read line number in a file. When ~/myscript runs, it reads the entire log file, then checks for a "last-line" file, and reads the last line number from "last-line", and skips past those lines in the log file. This method is klunky because if log file is truncated, then the script should re-start the "last-read" file. Also, the longer the log file becomes, the longer it will take the script to read in its entirety. I'm running on Linux, so I don't mind hearing unixy-solutions -- any ideas are appreciated. Thanks, --Nate -- 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
