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

Re: BufEnter buggy?

Expand Messages
  • Christian Brabandt
    ... Now I am confused. Does this work for you yes or no? regards, Christian -- -- You received this message from the vim_use maillist. Do not top-post! Type
    Message 1 of 6 , Sep 30, 2013
    • 0 Attachment
      On Sun, September 29, 2013 19:58, Aaron Bohannon wrote:
      > So I did this:
      >
      > autocmd BufEnter * let g:foo = expand('%')
      >
      > And then I'd check the value of g:foo with :echo after switching/closing
      > windows.

      Now I am confused. Does this work for you yes or no?

      regards,
      Christian

      --
      --
      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.
    • Aaron Bohannon
      The autocmd that sets the variable does not get run when I close the last window on a tab page. It is easy to check that it _does_ get run in other
      Message 2 of 6 , Sep 30, 2013
      • 0 Attachment

        The autocmd that sets the variable does not get run when I close the last window on a tab page. It is easy to check that it _does_ get run in other circumstances.

        On Sep 30, 2013 12:06 PM, "Christian Brabandt" <cblists@...> wrote:
        On Sun, September 29, 2013 19:58, Aaron Bohannon wrote:
        > So I did this:
        >
        > autocmd BufEnter *  let g:foo = expand('%')
        >
        > And then I'd check the value of g:foo with :echo after switching/closing
        > windows.

        Now I am confused. Does this work for you yes or no?

        regards,
        Christian

        --
        --
        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/rIDzIjQ04sc/unsubscribe.
        To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@....
        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@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • Vlad Irnov
        ... Which Vim version are you using? I remember such bug being reported by someone and it was subsequently fixed before version 7.4. It can be tested as
        Message 3 of 6 , Sep 30, 2013
        • 0 Attachment
          On 9/28/13, Aaron Bohannon <aaron678@...> wrote:
          > I have an autocmd that updates the window title in my terminal based on the
          > current file name. BufEnter clearly seems to be the event I would want to
          > trigger it with. But I've noticed two problems:
          >
          > (a) BufEnter isn't getting triggered after closing the last window in a tab
          > and ending up in a different tab. ...

          Which Vim version are you using? I remember such bug being reported by
          someone and it was subsequently fixed before version 7.4. It can be
          tested as follows:

          tabnew Foo
          autocmd BufEnter <buffer> let g:foo+=1
          tabmove
          tabnew
          let g:foo = 0
          wincmd c
          echo g:foo

          The output is:
          0 (wrong) in Vim 7.3.829
          1 (correct) in Vim 7.3.145, Vim 7.4.000

          Regards,
          Vlad

          --
          --
          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.
        Your message has been successfully submitted and would be delivered to recipients shortly.