Well...I finally found some :help related to this. From :help ftplugin
(then scroll down or search for the "OPTIONS" section):

> To make sure the filetype plugin only affects the current buffer use the
>
>       :setlocal
>
> command to set options.  And only set options which are local to a buffer (see
> the help for the option to check that).  When using |:setlocal| for global
> options or options local to a window, the value will change for many buffers,
> and that is not what a filetype plugin should do.

However, I am still stumped about a good way to accomplish setting
window-local options based on filetype. I tried this, in my .vimrc:

    autocmd FileType txt call setbufvar(expand("<afile>"), "&wrap", 1)
    autocmd FileType txt call setbufvar(expand("<afile>"),
"&linebreak", 1)

The wrong window STILL gets its option set, even though I explicitly
specify the buffer to apply it to.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui