Giter VIP home page Giter VIP logo

vim-autosave's Introduction

vim-autosave

A plugin to automatically save your files

This plugin uses timers to automatically save your work as temporary files.

This makes use of the new timer functionality available with Vim 8. Backup files will be written (by default every 5 minutes if the buffer was changed) in your backupdir setting with a default extensions of '.backup'

Unnamed buffers will be saved as 'unnamed_buffer_<YYYYMMDD_HHMM>.txt.backup'

Installation

Use the plugin manager of your choice.

Alternatively, since Vim 8 includes a package manager by default, clone this repository below ~/.vim/pack/dist/start/

You should have a directory ~/.vim/pack/dist/start/vim-autosave That directory will be loaded automatically by Vim.

Usage

Once installed, take a look at the help at :h vim-autosave (not yet available).

Here is a short overview of the functionality provided by the plugin:

Ex commands:

:EnableAutoSave     - Enable the plugin (by default every 5 minutes)
:DisableAutoSave    - Disable the plugin
:AutoSave <millis>  - Enable the plugin (every <millis> milliseconds)
:AutoSave           - Output status of the plugin

Configuration variables (and defaults)

:let g:autosave_extensions = '.backup'  - extension used for saving modified files
:let g:autosave_backup     = '~/.vim/backup' - directory where to save backup files
:let g:autosave_max_copies = 20 - max number of copies (per file)
:let g:autosave_timer      = 60*5*1000  - number of milliseconds to trigger
                                          (by default every 5 minutes)

When g:autosave_backup is defined and the directory exists, the path of the saved buffer will be encoded into the filename, encoding directory separators by '=+'.

License & Copyright

Developed by Christian Brabandt. The Vim License applies. See :h license

© 2009-2016 by Christian Brabandt

NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK

vim-autosave's People

Contributors

chrisbra avatar musq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.