Have you tried the advice at
http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text?

I use this tip, and yet occasionally encounter such slowdowns (often
whenediting large Vim scripts (ft=vim)). There's noticeable delay in
moving the cursor, and insert-completion (i_CTRL-N) is also painfully slow

Yeah I realize it's not a full solution. Is the issue pretty much
known, it just needs a good fix figured out? Or does it still need
investigation? Does the OP's backtrace help at all? I admit I've not
used gdb enough to know how to use it effectively, but it looks like
all it points to is "somewhere in the syntax folding routines Vim is
being slow".

...

My friend suggested I use the tip on the Vim wiki but it doesn't
really solve the root problem, it just makes it occur less often, but
once the "bug" triggers it's just as big of a problem :-\

Does

https://vimhelp.appspot.com/vim_faq.txt.html#faq-29.7

help?

Thanks for the suggestion Charles, but the tip you linked to comes down to the same automatic commands in the link at the top of the quoted text, which is the tip I was referring to when I said I tried the tip on the Vim wiki but it didn't help that much -- I've been using that tip for more than a month and the slow downs still bug me every day.

Maybe Vim is just not ready for syntax based folding of large buffers. I know some of my file type plug-ins are pushing Vim to its limits, but after investing several years getting to know Vim and its scripting language and writing thousands of lines of Vim script I'm not yet ready to give up on Vim :-)

Anyway in the worst case I'll just disable syntax folding for buffers where line('$') > 1000 holds. At least then I still get to enjoy all of the other goodies Vim has to offer. I'm definitely not switching back to an IDE :-P. I'll keep vim-dev up to date in case I make any progress on this issue.

 - Peter

PS. I did find a nasty bug in the file type plug-in I mentioned earlier; automatic commands were stacking up instead of being cleared before definition. If this turns out to have caused my issue (and the tip is in fact a valid workaround) I'll report back here in a few days.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui