Loading ...
Sorry, an error occurred while loading the content.

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

Expand Messages
  • Ben Fritz
    Oct 2, 2013
    • 0 Attachment
      On Wednesday, October 2, 2013 7:37:35 AM UTC-5, Henry 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.
      >
      > 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?
      >

      Nope, I just meant something stupid and hacky like:

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

      Now I realize you could probably do better using the tag stack, taking a hint from the examples given just under ":help :tags":

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

      --
      --
      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@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 11 messages in this topic