On 2011-05-13, Jan Larres wrote:
> Hi all,
> 
> I've recently been trying to write a 'foldtext' setting that is specific
> to LaTeX and would include useful information like for a example the
> caption information for a folded environment. But then I discovered that
> the 'foldtext' setting is local to a window and not to a buffer, making
> filetype-specific foldtexts pretty much impossible. So if I were to for
> example edit my LaTeX file and a C file that I'm writing about in the
> same window I can't have foldtexts that are tuned for those files,
> respectively.
> 
> Is there a reason for this? Would it be possible to change it? I can see
> the rationaly for having some fold settings window-local so you can have
> for example the file folded in one window and unfolded in a different
> one, but I can't see any reason why the foldtext should behave in the
> same way.
> 
> I guess you could sort of work around that by defining buffer-local
> functions, but it probably wouldn't be pretty.

I think you misunderstand the meaning of "window" here.  See

    :help window

As explained there, you can have multiple windows open to a single
buffer, but each window opens to only one buffer.  So each window
has at most one file type associated with it.  You can't edit a
LaTeX file and a C file in the same window.

I have several filetype plugins that "setlocal foldtext=something"
and haven't experienced any problems or odd behavior.

Regards,
Gary

-- 
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