Alexey I. Froloff wrote:
* A.J.Mechelynck <antoine.mechelynck@> [060831 01:48]:
If I misunderstood, please be more specific: do you or don't you want to override the filetype detected by filetype.vim ?
No.  Not override, but extend as if it was done in filetype.vim.

What user scripts can break with this changes?


I don't "think" il will break anything; but you may want to run it and try. ":scriptnames" gives you at any time the name of all scripts that have been sourced so far in the present Vim session, each of them listed once, in the order they were first sourced.

":setf[iletype]" sets a filetype if none is set

":set filetype=<value>" or ":set ft=<value>" set a filetype unconditionally.

You can always test the variable &ft to see if any filetype (and which one) has already been set. Thus

        setf foo

is equivalent to

        if &ft == ""
                set filetype=foo
        endif

or even (IIUC) to

        let &ft = (&ft == "" ? "foo" : &ft)


Best regards,
Tony.

Reply via email to