{"id":13487251,"url":"https://github.com/907th/vim-auto-save","last_synced_at":"2026-02-22T14:04:17.821Z","repository":{"id":5457329,"uuid":"6651745","full_name":"907th/vim-auto-save","owner":"907th","description":"A Vim plugin which saves files to disk automatically.","archived":false,"fork":false,"pushed_at":"2022-08-08T07:57:30.000Z","size":54,"stargazers_count":464,"open_issues_count":12,"forks_count":35,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-02-04T23:51:48.559Z","etag":null,"topics":["vim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/907th.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-12T10:28:43.000Z","updated_at":"2025-01-30T10:16:55.000Z","dependencies_parsed_at":"2022-08-06T18:15:44.590Z","dependency_job_id":null,"html_url":"https://github.com/907th/vim-auto-save","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/907th%2Fvim-auto-save","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/907th%2Fvim-auto-save/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/907th%2Fvim-auto-save/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/907th%2Fvim-auto-save/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/907th","download_url":"https://codeload.github.com/907th/vim-auto-save/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246250960,"owners_count":20747424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["vim-plugin"],"created_at":"2024-07-31T18:00:57.052Z","updated_at":"2025-10-18T16:47:45.602Z","avatar_url":"https://github.com/907th.png","language":"Vim script","funding_links":[],"categories":["Vim Script"],"sub_categories":[],"readme":"# Call for Maintainer\n\nDear users of this plugin! Sorry, but I no longer maintain it!\nIf someone of you are interested in maintaining it,\nplease, contact me and I will add you as a contributor.\n\n# Description\n\nAutoSave - automatically saves changes to disk without having to use `:w`\n(or any binding to it) every time a buffer has been modified or based on your\npreferred events.\n\nInspired by the same feature in RubyMine text editor.\n\nBy default AutoSave will save every time something has been changed in normal\nmode and when the user leaves insert mode. This configuration is a mix between\n\"save as often as possible\" and \"try to avoid breaking other plugins that depend\non filewrite-events\".\n\n\n# Installation\n\nUse [vundle](https://github.com/gmarik/vundle) or\ndownload [packaged version](http://www.vim.org/scripts/script.php?script_id=4521)\nfrom vim.org.\n\n\n# Usage\n\nAutoSave is disabled by default, run `:AutoSaveToggle` to enable/disable it.\n\n\n# Options\n\n## Enable on Startup\n\nIf you want the plugin to be enabled on startup use the `g:auto_save` option.\n\n```VimL\n\" .vimrc\nlet g:auto_save = 1  \" enable AutoSave on Vim startup\n```\n\nIt's also possible to override global `g:auto_save` value individually per buffer or window. For example, if you have auto save enabled globally, you can opt out some files. And vice versa, opt in some files, when you have auto save disabled globally.\n\n```vim\nlet g:auto_save = 0\naugroup ft_markdown\n  au!\n  au FileType markdown let b:auto_save = 1\naugroup END\n```\n\n## Silent\n\nAutoSave will display on the status line on each auto-save by default:\n\n```\n(AutoSave) saved at 08:40:55\n```\n\nYou can silence the display with the `g:auto_save_silent` option:\n\n```VimL\n\" .vimrc\nlet g:auto_save_silent = 1  \" do not display the auto-save notification\n```\n\n## Events\n\nThe events on which AutoSave will perform a save can be adjusted using the\n`g:auto_save_events` option. Using `InsertLeave` and `TextChanged` only,\nthe default, will save on every change in normal mode and every time you leave insert mode.\n\n```VimL\n\" .vimrc\nlet g:auto_save_events = [\"InsertLeave\", \"TextChanged\"]\n```\n\nOther events you may want to use:\n\n- `TextChangedI` will save after a change was made to the text in the current buffer in insert mode.\n- `CursorHold` will save every amount of milliseconds as defined in the `updatetime` option in normal mode.\n- `CursorHoldI` will do the same thing in insert mode.\n- `CompleteDone` will also trigger a save after every completion event.\n\nSome of these commands may not be available, depending on your Vim installation.\nSee the autocommands overview for a complete listing (`:h autocommand-events`).\n\n**Warning!** Be advised to be careful with the `updatetime` option since it has shown to\ncause problems when set too small. 200 seems already to be too small to work\nwith certain other plugins. Use 1000 for a more conservative setting.\n\n## (Pre/Post)save Hooks\n\nIf you need an autosave hook (such as generating tags post-save, or aborting the save earlier)\nthen use `g:auto_save_postsave_hook` or `g:auto_save_presave_hook` options:\n\n```VimL\n\" .vimrc\n\n\" This will run :TagsGenerate after each save\nlet g:auto_save_postsave_hook = 'TagsGenerate'\n\n\" This will run AbortIfNotGitDirectory function before each save\nlet g:auto_save_presave_hook = 'call AbortIfNotGitDirectory()'\n\n\" Example hook from vim-auto-save-git-hook plugin\nfunction! AbortIfNotGitDirectory()\n  if ...\n    let g:auto_save_abort = 0\n  else\n    let g:auto_save_abort = 1\n  endif\nendfunction\n```\n\n## Write to All Buffers\n\nBy default only the current buffer is written (like `:w`). You can choose that\nall buffers are written on autosave using the `g:auto_save_write_all_buffers`\noption (like `:wa`).\n\n```VimL\n\" .vimrc\nlet g:auto_save_write_all_buffers = 1  \" write all open buffers as if you would use :wa\n```\n\n\n# Development\n\nThe `doc/auto-save.txt` is a converted version of the `README.md`. Don't edit\nit directly. Instead install the [md2vim](https://github.com/FooSoft/md2vim) and\nrun the `update_doc_from_readme.sh` script.\n\n\n# Contribution or Bug Report\n\nDevelopment is made in [907th/vim-auto-save](https://github.com/907th/vim-auto-save) repo.\nPlease, report any bugs and/or suggestions there. Any contrubution is welcomed!\n\n\n# License\n\nDistributed under the MIT License (see LICENSE.txt).\n\nCopyright (c) 2013-2021 Aleksei Chernenkov\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F907th%2Fvim-auto-save","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F907th%2Fvim-auto-save","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F907th%2Fvim-auto-save/lists"}