Shougo / neocomplcache.vim

Ultimate auto-completion system for Vim.
http://www.vim.org/scripts/script.php?script_id=2620
1.72k stars 135 forks source link

foldmethod problem #380

Closed gregslu closed 11 years ago

gregslu commented 11 years ago

Hi, when foldmethod is set to expr, neocomplcache sets it to manual, foldexpr to 0 and leaves it that way, which breaks creation of new folds in the file. Ps. I use custom foldexpr: https://github.com/viszu/vim-pysior/blob/master/ftplugin/python/folding.vim

Shougo commented 11 years ago

Yes. This is feature. Because, if foldmethod is "expr" or "syntax", auto completion will be too heavy.

PS: I changed this feature to enable 1000+ lines file only.

Shougo commented 11 years ago

I want to fix it. But this is Vim internal problem...

gregslu commented 11 years ago

Hi again, maybe create global variable to let user disable this foldmethod change even if it is 'too heavy', or let user pick the number of lines at which this will occur (now it's hard coded 1000) ? Also if I remember correctly, neosnippet is also changing fold method, so I would love to see this fix there too.

Shougo commented 11 years ago

I removed changing foldmethod feature in neosnippet.

Hi again, maybe create global variable to let user disable this foldmethod change even if it is 'too heavy', or let user pick the number of lines at which this will occur (now it's hard coded 1000) ?

But I don't want to add option. Because neocomplcache has many many options...

gregslu commented 11 years ago

Ok, You know better :) Thank You for the fix!

Shougo commented 11 years ago

In ver.8 branch, it is improved. neocomplcache restore foldmethod on BufWritePost event.