Reputation: 577
I'm mainly using terminal vim and/or gvim 7.2 to work on my Perl project with following plugins:
The problem is editing a big files takes a few seconds for vim/gvim to autocomplete when I do C-N or C-X-O.
I've tried to do "set complete-=i" to remove the include files from the search list, but it doesn't solve the issue.
Has anyone else experienced the same problem and found a solution?
thanks!
Upvotes: 2
Views: 1571
Reputation: 9279
I had exactly the same issue a few months ago and it turned out to be to do with how folds are calculated. Setting foldmethod to manual only whilst in insert mode solved the issue. This doesn't change the current folds and has the added bonus that folds after your insertion point aren't opened.
"Sourced from vim tip: http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
autocmd InsertEnter * if !exists('w:last_fdm') | let w:last_fdm=&foldmethod | setlocal foldmethod=manual | endif
autocmd InsertLeave,WinLeave * if exists('w:last_fdm') | let &l:foldmethod=w:last_fdm | unlet w:last_fdm | endif
Hopefully this helps as this issue was driving me crazy!
Upvotes: 4
Reputation: 1768
Actually, I also find the same problem when I am using NeoComplCache. When I edit a large js file, it takes a long time when I press key to type a word, actually, it take a long time that some plugin is trying to search the whole buffer and give you some suggestion. Vim script itself is not so much efficient for process large text.
I suggest to remove ( or close if possible ) some of the auto-complete plugin and try again. Furthermore, if possible, select the minimum set of the vim extension that you think it is really useful for you and remove others.
Upvotes: 0