On Wed, 11 Aug 2010, Tim Johnson wrote:

> FYI: I am using vim 7.2 huge version on ubuntu 10.04.  I have used vim 
> for a long time, but am new to PHP and don't make much use of folding.
> 
> I am finding that vim folds certain (but not *all*) PHP functions and 
> futhermore, even with zR will 'refold' the same functions when the 
> window containing the file goes out of focus. I find this extremely 
> intrusive and want this feature to 'go away'. Although it is certainly 
> of use to me when I want it.
> 
> I have place the following line:
> setlocal foldlevel=99
> at the last line of 
> ~/.vim/after/ftplugin/php.vim
> 
> What else do I need to do?

PHP doesn't set up folding in its syntax files by default.  It requires:
let php_folding = (1 or 2)
(I think 2 is undocumented except in the syntax/php.vim source)

I don't have 10.04, but on a VM with Ubuntu 9.10, nothing was folded 
with foldmethod=syntax in a PHP file without setting php_folding in my 
.vimrc.

Perhaps you're folding by some other method?

:help 'foldmethod'

>   As an aside, I am not clear about the difference between zR and zE. 

zR just opens them all -- open, but they're still there
zE gets rid of them (for fdm=manual or fdm=marker) -- gone for good
(think 'E' = eliminate)

>   I may have something lurking in the session file from previous to 
>   the insertiong of the foldlevel=99 directive.

Try:

:verbose set fdm? fdl?

-- 
Best,
Ben

-- 
You received this message from the "vim_use" 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

Reply via email to