filetype in modeline

Lawrence Velázquez larryv at macports.org
Mon Jan 14 13:14:11 PST 2013


Oy vey, what have I done.

On Jan 14, 2013, at 10:35 AM, Rainer Müller <raimue at macports.org> wrote:

> On 2013-01-14 16:07, Clemens Lang wrote:
>> On Mon, Jan 14, 2013 at 09:33:34AM -0500, Jeremy Lavergne wrote:
>>>> Another way to make sure Portfiles have filetype set to Portfile despite
>>>> the modeline is adding the following line to your .vimrc:
>>>>   au BufNewFile,BufRead,BufWinEnter Portfile setlocal ft=Portfile
> 
> It already is in ftdetect/macports.vim [1], except that it is only done
> for the events BufNewFile,BufRead and not for BufWinEnter, while the
> latter is the reason your line actually works. The filetype is
> overridden each time again the buffer of a Portfile is displayed.
> Although this works in most circumstances, it has side effects when
> using hidden buffers.

Could mpvim set "nomodeline" and set the options (fileencoding, expandtab, etc.) itself?

vq


More information about the macports-dev mailing list