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

vim: how to disable vim backup file when launching vim command?

Expand Messages
  • ping
    vim backup file is great in 99% scenarios, but it s annoying to create an un-wanted file in some system directories, especially in dirs that contains
    Message 1 of 3 , Jan 20, 2013
    • 0 Attachment
      vim backup file is great in 99% scenarios, but it's annoying to create
      an un-wanted file in some system directories, especially in dirs that
      contains configurations for apps.
      how, can I disable the backup file creation, right when I launch vim to
      read a file?

      I know another workaround is to just launch vim without any file, turn
      off backup file creation, and then open the files...


      --
      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
    • Phil Dobbin
      ... I m not aware of an option to turn backups off on a per file basis but I always set in my vimrc the directory to which the backups are saved: set backup
      Message 2 of 3 , Jan 20, 2013
      • 0 Attachment
        On 01/21/2013 07:24 AM, ping wrote:

        > vim backup file is great in 99% scenarios, but it's annoying to create
        > an un-wanted file in some system directories, especially in dirs that
        > contains configurations for apps.
        > how, can I disable the backup file creation, right when I launch vim to
        > read a file?
        >
        > I know another workaround is to just launch vim without any file, turn
        > off backup file creation, and then open the files...

        I'm not aware of an option to turn backups off on a per file basis but I
        always set in my vimrc the directory to which the backups are saved:

        'set backup

        set backupdir=~/.backup'

        Cheers,

        Phil...

        --
        currently (ab)using
        CentOS 5.8 & 6.3, Debian Squeeze & Wheezy, Fedora Beefy & Spherical,
        Lubuntu 12.10, OS X Snow Leopard & Ubuntu Precise & Quantal
      • Shlomi Fish
        Hi, On Mon, 21 Jan 2013 07:46:03 +0000 ... You can always use :autocmd : http://vimdoc.sourceforge.net/htmldoc/autocmd.html Regards, Shlomi Fish -- ... Shlomi
        Message 3 of 3 , Jan 21, 2013
        • 0 Attachment
          Hi,

          On Mon, 21 Jan 2013 07:46:03 +0000
          Phil Dobbin <phildobbin@...> wrote:

          > On 01/21/2013 07:24 AM, ping wrote:
          >
          > > vim backup file is great in 99% scenarios, but it's annoying to create
          > > an un-wanted file in some system directories, especially in dirs that
          > > contains configurations for apps.
          > > how, can I disable the backup file creation, right when I launch vim to
          > > read a file?
          > >
          > > I know another workaround is to just launch vim without any file, turn
          > > off backup file creation, and then open the files...
          >
          > I'm not aware of an option to turn backups off on a per file basis but I
          > always set in my vimrc the directory to which the backups are saved:
          >
          > 'set backup
          >
          > set backupdir=~/.backup'
          >

          You can always use :autocmd :

          http://vimdoc.sourceforge.net/htmldoc/autocmd.html

          Regards,

          Shlomi Fish

          --
          -----------------------------------------------------------------
          Shlomi Fish http://www.shlomifish.org/
          UNIX Fortune Cookies - http://www.shlomifish.org/humour/fortunes/

          If God exists and is the ego‐maniacal, sadistic and helpless creature that is
          described in the Old Testament, then we’re in deep trouble.

          Please reply to list if it's a mailing list post - http://shlom.in/reply .

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