quickfix-like options for regular editing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

quickfix-like options for regular editing

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

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CACQ%2BYcuJFAdCiCZhHJjU29Uu4Y-U1Bj4fUVKKfxmyc-aUffWtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.