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

Re: How to refresh (reload) an opened file?

Expand Messages
  • Sam Roberts
    ... e is edit % is current file name -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are
    Message 1 of 13 , May 18, 2013
    • 0 Attachment
      :e %

      e is edit
      % is current file name

      --
      --
      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.
    • Tim Chase
      ... The % is optional, as that s the default if you don t specify anything. If you ve made unsaved changes to your current buffer, ... Note that reloading
      Message 2 of 13 , May 18, 2013
      • 0 Attachment
        On 2013-05-18 08:42, Sam Roberts wrote:
        > :e %
        >
        > e is edit
        > % is current file name

        The "%" is optional, as that's the default if you don't specify
        anything. If you've made unsaved changes to your current buffer,
        you'll need to "!" it:

        :e!

        Note that reloading loses things like the jump-list and undo history
        for the buffer, so it might be better to do something like

        :%d
        :$r %
        :0d

        which should keep at least preserve the undo history though the
        reload.

        -tim



        --
        --
        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.
      • Ben Fritz
        ... As I mentioned back in February, if you have undofile and undoreload set properly, you can actually undo reading in the file if it abandoned your
        Message 3 of 13 , May 19, 2013
        • 0 Attachment
          On Saturday, May 18, 2013 4:20:48 PM UTC-5, Tim Chase wrote:
          >
          > Note that reloading loses things like the jump-list and undo history
          >
          > for the buffer, so it might be better to do something like
          >
          >
          >
          > :%d
          >
          > :$r %
          >
          > :0d
          >
          >
          >
          > which should keep at least preserve the undo history though the
          >
          > reload.
          >
          >
          >
          > -tim

          As I mentioned back in February, if you have 'undofile' and 'undoreload' set properly, you can actually undo reading in the file if it abandoned your unsaved changes.

          --
          --
          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.
        • Tim Chase
          ... Ah, I knew this thread sounded familiar, and I d forgotten about that. I m not sure why the thread was resurrected 3 months later o_O -tim -- -- You
          Message 4 of 13 , May 19, 2013
          • 0 Attachment
            On 2013-05-19 18:20, Ben Fritz wrote:
            > On Saturday, May 18, 2013 4:20:48 PM UTC-5, Tim Chase wrote:
            >> Note that reloading loses things like the jump-list and undo
            >> history
            >
            > As I mentioned back in February, if you have 'undofile' and
            > 'undoreload' set properly, you can actually undo reading in the
            > file if it abandoned your unsaved changes.

            Ah, I knew this thread sounded familiar, and I'd forgotten about
            that. I'm not sure why the thread was resurrected 3 months later o_O

            -tim


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