Skip to content

Vim autosave

To automatically save your changes in NeoVim you can use the auto-save plugin.

It has some nice features

  • Automatically save your changes so the world doesn't collapse
  • Highly customizable:
  • Conditionals to assert whether to save or not
  • Execution message (it can be dimmed and personalized)
  • Events that trigger auto-save
  • Debounce the save with a delay
  • Hook into the lifecycle with autocommands
  • Automatically clean the message area


  cmd = "ASToggle", -- optional for lazy loading on command
  event = { "InsertLeave", "TextChanged" }, -- optional for lazy loading on trigger events
  opts = {
    -- your config goes here
    execution_message = {
      enabled = false,


Besides running auto-save at startup (if you have enabled = true in your config), you may as well:

  • ASToggle: toggle auto-save