setting syntax on in vim with large C file makes complete very slow

Posted by skeept on Stack Overflow See other posts from Stack Overflow or by skeept
Published on 2010-05-26T21:16:53Z Indexed on 2010/05/27 5:01 UTC
Read the original article Hit count: 208

Filed under:
|

when I have syntax on in a large C file (about 8000) lines the completion ctrl-p and ctrl-n are very slow (more than 20). When I turn syntax off then completion takes less than a second.

Any ideas on how to solve this?

Thanks!

EDIT:

I figured out a minimal way of reproducing this behaviour: with an empty .vimrc and .vim folder the only changed settings are

:set syntax on
:set foldmethod=syntax

and a large C file to edit, completion (and even general editing) becomes very very slow.

© Stack Overflow or respective owner

Related posts about c

    Related posts about vim