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

Very slow for files over 1000 lines #67

Open
moll opened this issue Jun 2, 2017 · 2 comments
Open

Very slow for files over 1000 lines #67

moll opened this issue Jun 2, 2017 · 2 comments

Comments

@moll
Copy link

moll commented Jun 2, 2017

Hey!

Thanks for taking the time to write VimL!

However, is it me or is the SCSS syntax highlighting particularly slow for long files? Or in that sense, slow for any file, but particularly noticeable for larger files. Switching back and from the highlighted buffer ends up taking half a second...

@moll
Copy link
Author

moll commented Jun 14, 2022

Oh, I didn't remember I reported this 5 years ago. Anyways, I've tracked this down to the https://github.com/cakebaker/scss-syntax.vim/blob/master/ftdetect/scss.vim#L2 line:

au BufEnter *.scss :syntax sync fromstart

Given a long file, this causes quite the delay when entering the buffer, and seems unnecessary as well.

@cakebaker
Copy link
Owner

Thanks for your comment.

I don't think the command is unnecessary. Without it, I get highlighting errors from time to time. What you could try in your .vimrc is to either clear the sync settings with:

au BufEnter *.scss :syntax sync clear

or to use minlines instead of fromstart:

au BufEnter *.scss :syntax sync minlines=100

Hope that helps.

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

2 participants