-
Notifications
You must be signed in to change notification settings - Fork 78
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
All folds closed on buffer re-entry #54
Comments
Bizarre. Doubtful that Pathogen is, err, the pathogen. Maybe you can try co-enabling just one of your other plugins at a time, and see if you can pin down the culprit that way? |
After a major clean-up of my .vimrc, I'm unable to reproduce this. Closing. |
Oh well. Sorry I couldn’t help, and too bad the problem persists (whatever it was that caused it). So it goes. 😄 |
So, necro-bug. This was happening again. My test setup is only:
And only this in my .vimrc:
I start vim *.php, it shows 1 level of folding. I open one of the folds, I have a feeling vim-css-color is re-loading the buffe, which is causing foldlevelstart to re-fold the buffer. The idea is supposed to be that foldlevelstart sets the fold level the first time the file is loaded into the buffer only, which would be good. This would allow me to switch from buffer to buffer and not have the folds change. Does that make sense? Any idea of a workaround? I've tried moving vim-css-color and :so'ing outside_bundle/vim-css-color/autoload/css_color.vim, but it doesn't seem to work. |
It shouldn’t, and as far as I know it doesn’t. A buffer reload does sound like one plausible explanation for the behaviour you’re seeing, but I don’t know off hand how Silly question first: have you confirmed that it doesn’t happen without |
Yes. With that stripped-down configuration, I can comment the pathogen#infect() call in and out, and also the foldlevelstart. It's clearly vim's foldlevelstart functionality being trigged by something vim-css-color is doing... I'd offer to start commenting out parts of vim-css-color, but since I don't know it well I'd likely cause more code to not be engaged than I'd expect with a particular comment. |
(Hmm. Does your |
Something weird is going on here. If I leave the If I leave all the files in place but comment out the It feels like some implicit reinitialisation of some sort of buffer state happens somewhere in Vim that |
Ick. Glad you've reproduced it. No, no |
What’s confusing me is how What does I did my experiments with a set foldmethod=indent
set foldlevelstart=1
let g:php_folding=1
syn on With that setup I can reproduce the problem you describe. Without the I’ve now also tested making an empty |
Grepping them all,
That file comes from vim-common on my Ubuntu 16.04 system, and its version is Version: 2:7.4.1689-3ubuntu1 |
Well then, one mystery down. Progress! |
This makes no sense, but I'm stuck.
When I switch back to a buffer (:bnext), all of my folds are folded completely. In other words, the buffer is not how I left it. If I take out vim-css-color, the problem goes away.
If I have an empty .vimrc/.vim and just install vim-css-color, there's no problem.
So, it's obviously an interaction between vim-css-color and one of my other plugins (syntastic, pathogen, ???)
Any pointers on what to look for?
The text was updated successfully, but these errors were encountered: