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

how to open only session files?

Expand Messages
  • Bee
    how to open only session files? I have made a session.vim, when it opens all the previous files I was working on open, this is good. 1) But if I quit vim, 2)
    Message 1 of 3 , Dec 30, 2009
    • 0 Attachment
      how to open only session files?

      I have made a session.vim, when it opens all the previous files I was
      working on open, this is good.

      1) But if I quit vim,
      2) later open a file not in the buffer list
      3) quit vim
      4) open the session file, some files that are NOT part of the session
      will be in the buffer list

      How do I keep the session.vim file "clean", that is, when opened only
      my working files are in the buffer list.

      --
      Bill
      Santa Cruz, California

      --
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Bee
      I forgot to say I have this set: save/restore buffer list set viminfo+=% I was hoping the session file would take precedence. It seems not. -- You received
      Message 2 of 3 , Dec 30, 2009
      • 0 Attachment
        I forgot to say I have this set:

        " save/restore buffer list
        set viminfo+=%

        I was hoping the session file would take precedence.

        It seems not.

        --
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Tony Mechelynck
        ... If you :bd[elete] or :bw[ipe] a file instead of just :q[uit] ting it, then neither the viminfo nor the session file will remember it -- unless you
        Message 3 of 3 , Mar 1 12:19 AM
        • 0 Attachment
          On 31/12/09 07:43, Bee wrote:
          > I forgot to say I have this set:
          >
          > " save/restore buffer list
          > set viminfo+=%
          >
          > I was hoping the session file would take precedence.
          >
          > It seems not.
          >

          If you ":bd[elete]" or ":bw[ipe]" a file instead of just ":q[uit]"ting
          it, then neither the viminfo nor the session file will remember it --
          unless you saved the viminfo with ":wv[iminfo]" while the file was still
          listed.

          The session file is normally used to remember which files are in your
          windows and tabs. (It can also remember options, the buffer list, etc.)
          The buffer list is in addition to windows and tabs, and remembers (among
          others) the marks (including the latest cursor position) for each of the
          files in the buffer list.

          See
          :help :bdelete
          :help :bwipe
          :help viminfo
          :help 'viminfo'
          :help :wviminfo
          :help 'sessionoptions'
          :help :mksession


          Best regards,
          Tony.
          --
          If little green men land in your back yard, hide any little green women
          you've got in the house.
          -- Mike Harding, "The Armchair Anarchist's Almanac"

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