Skip to content

truncating files #457

Open
Open

Description

@mvolkmann

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.

Activity

  1. mvolkmann commented on May 5, 2023

    @mvolkmann
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions