Ed Peschko
unread,May 13, 2019, 12:46:15 PM5/13/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to vim...@googlegroups.com
All,
I had an idea in mind for how I would like to use vim. On a regular
basis we generate logs of scripts which have 'quickfix-like' elements
in them - stack-traces and the like.
I'd like to be able to navigate to a given line of the file containing
the stack-traces and based off of a user-defined config:
1. split the file horizontally based on the quick-fix element on the line
2. go to the line number of that quick-fix element
3. go back to the current location in the log file
4. do it in such a way that is basically imperceptible to the user
5. do nothing in the case there is is no quick-fix element.
Now, for #4 I know I could program a macro to navigate to the file do
a :split <cfile>, grab the number in the buffer, navigate to that line
number, do ctrl-W, ctrl-W, but I want it to be seamless. I want it
triggered any time I go to a new line, and I want it to be
imperceptible to the user.
So a couple of questions:
1. does something like this exist?
2. is there a way to trigger a macro each time a new line is navigated to?
3. is there a keybinding to do what I describe above, namely split on
a file/lineno combo - replacing any open buffer if necessary,
navigating to that line number and then ideally returning back to the
original context?
If there isn't such functionality already, I'd be willing to donate
something (time/development cost) to create it. I think it would be a
gamechanger given how inefficient people are with their debugging
process. And there are many files out there that are like this - which
have embedded info that it would be helpful to auto-jump to.
thanks much for any info