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

vim-asciidoc: speed up the refresh process for big files #91

Merged
merged 1 commit into from
Dec 12, 2019

Conversation

aerostitch
Copy link
Contributor

Hi guys,

The removal of those lines were requested in Debian to speed up vim's refresh process on big files: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767179

It has been there for over 2 years now so I thought I might just push it here too (I'll push it in the vim-asciidoc repo too to keep them in sync while the transition is being done) :)

Thanks,
Joseph

@MasterOdin
Copy link
Member

I do not use vim at all so I have no idea why one would want or not want those lines. What is their use and what is the downside of removing them?

@aerostitch
Copy link
Contributor Author

Hi Matthew!

Vim is my only editor. :)

The syn sync * options determine from which position in the file it should start processing syntax rules when the file is opened and then the sync of the highlighting every time something changes in the document.
syn sync fromstart means that the highlighting of the file should be evaluated from the beginning of the document (every time something changes).
syn sync linebreaks=100 any change in the file will clear the syntax caches from a hundred of
previous lines.
Having the 2 together means doing the re-evaluation twice for the entire document every time something changes which is a really odd combination. It's better to leave vim take care of his caches by default. Way faster and I've edited a LOT of documents without ever having an issue with that config in place.

Makes sense?

Joseph

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

Successfully merging this pull request may close these issues.

None yet

2 participants