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

truncating files #457

Open
mvolkmann opened this issue Apr 24, 2023 · 1 comment
Open

truncating files #457

mvolkmann opened this issue Apr 24, 2023 · 1 comment

Comments

@mvolkmann
Copy link

When I have this plugin installed and I save changes to a large file (10000 lines or more), sometimes hundreds of lines at the end of the file get deleted. So far I have only noticed this in very large Markdown files. I suspect what is happening is that when I enter ":w" to write the file, neoformat begins formatting the file and before it can finish, the part it has formatted so far gets written out. I can reproduce the issue by adding a markdown table anywhere in the file and entering ":w". For example, something like this:

| foo | bar |
|-|-|
| test | this |

Neoformat adjusts all the cell widths in the Markdown table to line up nicely which I love.

@mvolkmann
Copy link
Author

It seems that if I type ":w" and wait two seconds before pressing the return key, this does not happen.
So I suspect it is a timing issue related to giving the formatting time to finish before writing out the file.

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

1 participant