Wednesday, October 2, 2013

Re: Each buffer in own tab/function lookup seem to clash

> > If that doesn't work, you could try modifying your MatchCaseTag function
> > to issue a second tjump command in case the first doesn't work. It's a
> > hack, but maybe it will fix your problem.

By "in case the first doesn't work" I presume you mean an exception?

    try
        exe 'tjump ' . expand('<cword>')
    catch
        exe 'tjump ' . expand('<cword>')
    finally
       let &ic = ic
    endtry


But this doesn't do much because the first exe/tjump doesn't actually "fail" per se:  it always opens the file successfully...

Unless I'm not understanding your suggestion correctly?



On Wed, Oct 2, 2013 at 2:06 PM, Ben Fritz <fritzophrenic@gmail.com> wrote:
On Wednesday, October 2, 2013 1:08:02 AM UTC-5, Henry wrote:
> On Tuesday, October 1, 2013 5:18:59 PM UTC+2, Ben Fritz wrote:
> > > > If that doesn't work, you could try modifying your MatchCaseTag function
> > > > to issue a second tjump command in case the first doesn't work. It's a
> > > > hack, but maybe it will fix your problem.
> > > >
> >
> > I think instead of BuffAdd, I'd first try BufWinEnter. If that doesn't work,
> > then maybe BufReadPost would work.
>
> Spent some time brushing up on events at
> http://vimdoc.sourceforge.net/htmldoc/autocmd.html#{event}
>
> Sadly, "au BufWinEnter * nested tab sball" results in the error
> "E435: Couldn't find tag, just guessing"
>
> And so does "au BufReadPost * nested tab sball"
>
> At times like this I wish I could slip into an alternate universe for a few weeks or months and study the problem to the exclusion of all else in as much depth as required until a solution is found, then return to "now" where my eyelids have yet to complete their last lubricating blink and be hailed an all-knowing demi god.
>
> oh well.

Does the suggested workaround of issuing a second tag jump command get you the desired behavior? I'm kind of out of ideas after that since different autocmd events don't seem to avoid the problem.

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/juMNxDig_O4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
--
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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment