Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autosave only after the file is written #57

Open
crxyz0 opened this issue Jun 11, 2021 · 2 comments
Open

Autosave only after the file is written #57

crxyz0 opened this issue Jun 11, 2021 · 2 comments

Comments

@crxyz0
Copy link

crxyz0 commented Jun 11, 2021

Is there any setting that allows me to make it so vim-auto-save only starts autosaves after the file is written (manually using :w)?

I want this kind of setting because when I enter a new file using vim, I don't want vim-auto-save to immediately save after opening, because I might want to not keep the new file.
My current settings for vim-auto-save is only let g:auto_save = 1

Software:
Ubuntu, wsl2
nvim

@crxyz0 crxyz0 changed the title Only autosave only after the file is written Autosave only after the file is written Jun 11, 2021
@amacfie
Copy link

amacfie commented Jul 24, 2022

FWIW there's another plugin that has this feature: https://github.com/Pocco81/AutoSave.nvim/blob/3d342d6fcebeede15b6511b13a38a522c6f33bf8/README.md#:~:text=won%27t%20be%20saved.-,exists,-%3A%20(Boolean)%20if%20true

@igbanam
Copy link
Collaborator

igbanam commented Aug 4, 2023

This already does that.

Consider using the CursorHold events

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants