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 when used with syntax highlighting #25

Closed
barunio opened this issue Aug 30, 2011 · 3 comments
Closed

very slow when used with syntax highlighting #25

barunio opened this issue Aug 30, 2011 · 3 comments

Comments

@barunio
Copy link

barunio commented Aug 30, 2011

I'm mostly editing ruby files, and I noticed that supertab was being incredibly slow in some places (6 seconds for a simple completion without many buffers open). investigating more, i found that if i set "syntax off", supertab behaved much much faster. at the same time, the syntax highlighting doesn't significantly affect vim's performance outside of using supertab. any ideas on why syntax highlighting causes supertab specifically to behave so slowly?

@ervandew
Copy link
Owner

ervandew commented Sep 2, 2011

Is it just some ruby files where you notice this, or all of them?
Does the problem occur with other file types or just ruby?
Are there other plugins mapped to the tab key (:verbose imap )?

If you start vim with the minimal settings does the problem still occur?

$ vim -u NONE -U NONE --cmd "set nocp | sy on | filetype plugin indent on | ru plugin/supertab.vim"

Note: if supertab is in a pathogen or similar directory, then you'll need to add a | rtp+=/path/to/supertab/dir/ before the | ru plugin/supertab.vim part in the command above.

@barunio
Copy link
Author

barunio commented Sep 12, 2011

I followed the route you suggested and found there was no problem with minimal settings, and then I eventually managed to figure out the root of the problem --

let ruby_fold=1
syntax on

If ruby_fold is not enabled things work fine, or if ruby_fold is enabled and syntax highlighting is off things work fine. This explains why the problem occurs sporadically -- in the same file, tab completion is very slow in one place but fast in another.

I suppose the solution for now will have to be to turn ruby_fold off and try to find an alternative.

@ervandew
Copy link
Owner

Thanks for posting an update, it's good to know the cause should other users encounter the same issue.

I'm going to go ahead and close this ticket though since inefficient syntax files are outside the scope of supertab ;).

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