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

Backups

Expand Messages
  • Vigil
    Because savevers (script #89) no longer works properly with vim 7, you can see what I m trying to do here: autocmd BufWritePre,FileWritePre * saveas
    Message 1 of 6 , Jul 3 5:24 AM
    • 0 Attachment
      Because savevers (script #89) no longer works properly with vim 7, you can see
      what I'm trying to do here:

      autocmd BufWritePre,FileWritePre * saveas "~/backups/vim/" . % . "-" .
      strftime("%y%m%d-%H%M%s")

      However, I'm getting an error detected. I tried putting the new name of the
      backup copy into a variable and using that, thus:

      let filename = "~/backups/vim/" . % . "-" . strftime("%y%m%d-%H%M%s")
      autocmd BufWritePre,FileWritePre * saveas filename

      but of course it writes the file literally as "filename".

      How can I save a timestamped copy into a directory like that?

      --

      .
    • Yakov Lerner
      ... savevers perfectly works for me in vim7, just as it did for vim6 Yakov
      Message 2 of 6 , Jul 3 5:30 AM
      • 0 Attachment
        On 7/3/06, Vigil <vim5632@...> wrote:
        > Because savevers (script #89) no longer works properly with vim 7

        savevers perfectly works for me in vim7,
        just as it did for vim6

        Yakov
      • Vigil
        ... Weird. Tell me, do your settings differ greatly from mine?: savevers set backup set patchmode=.prev let savevers_dirs= ~/backups/vim exe set
        Message 3 of 6 , Jul 3 5:56 AM
        • 0 Attachment
          >> Because savevers (script #89) no longer works properly with vim 7
          >
          > savevers perfectly works for me in vim7,
          > just as it did for vim6

          Weird. Tell me, do your settings differ greatly from mine?:

          " savevers
          set backup
          set patchmode=.prev
          let savevers_dirs="~/backups/vim"
          exe "set backupskip+=*" . &patchmode
          exe "set suffixes+=" . &patchmode
          exe "set wildignore+=*" . &patchmode

          --

          .
        • Yakov Lerner
          ... Here are my savevers settings: {{{ configuration for savevers.vim http://www.vim.org/scripts/script.php?script_id=89 -- savevers.vim plugin by Ed
          Message 4 of 6 , Jul 3 6:16 AM
          • 0 Attachment
            On 7/3/06, Vigil <vim5632@...> wrote:
            > >> Because savevers (script #89) no longer works properly with vim 7
            > >
            > > savevers perfectly works for me in vim7,
            > > just as it did for vim6
            >
            > Weird. Tell me, do your settings differ greatly from mine?:
            >
            > " savevers
            > set backup
            > set patchmode=.prev
            > let savevers_dirs="~/backups/vim"
            > exe "set backupskip+=*" . &patchmode
            > exe "set suffixes+=" . &patchmode
            > exe "set wildignore+=*" . &patchmode

            Here are my savevers settings:

            " {{{ configuration for savevers.vim
            " http://www.vim.org/scripts/script.php?script_id=89 -- savevers.vim
            plugin by Ed Ralston
            let savevers_types='*'
            let savevers_max=9999
            let savevers_purge=1
            let savevers_dirs="~/tmp/"
            "patchmode is required for savevers to work
            set patchmode=.ORIG
            set backup
            " }}}

            Can it be that my version of savevers, being not the latest savevers,
            works better than the later versions of savevers ?

            I am attaching the exact version of savevers that I'm using.

            I never pulled from vim.org another version of savevers since I
            pulled it for the 1st time, and this was long time ago.

            Anyway, this one works for me flawlessly.

            Yakov
          • Vigil
            ... Weird. I guess when I pulled my latest copy (we both are using 0.8), it was corrupt or something, because yours works. Thanks. -- .
            Message 5 of 6 , Jul 3 7:28 AM
            • 0 Attachment
              > Can it be that my version of savevers, being not the latest savevers,
              > works better than the later versions of savevers ?

              Weird. I guess when I pulled my latest copy (we both are using 0.8), it was
              corrupt or something, because yours works. Thanks.

              --

              .
            • Robert Hicks
              set backup set backupdir=~/.vim/backup set dir=~/.vim/temp Configuration for savevers.vim http://www.vim.org/scripts/script.php?script_id=89 set
              Message 6 of 6 , Jul 3 2:24 PM
              • 0 Attachment
                set backup
                set backupdir=~/.vim/backup
                set dir=~/.vim/temp

                " Configuration for savevers.vim
                " http://www.vim.org/scripts/script.php?script_id=89
                set patchmode=.prev

                let savevers_types="*"
                let savevers_max=10
                let savevers_purge=1
                let savevers_dir=&backupdir



                That is my config...and it doesn't work. It should dump them all in the
                backupidr but instead they show up in my home dir.

                I am on OSX.

                I have tried a full path /Users/robert/.vim/backup but that doesn't work
                either.

                :Robert
              Your message has been successfully submitted and would be delivered to recipients shortly.