Skip to content

Wrong filetype detection priority if BufWrite * BufRead * autocmd hooks are present #587

@cengiz-io

Description

@cengiz-io

Hello there. I was the reporter of wting/rust.vim#10
(There are other issues as well: rust-lang/rust.vim#10)

I just found that having these two autocmd hooks will change the priority of filetype detection.

No matter what your .vimrc Vundle initialisation order is.

autocmd BufWrite * mkview
autocmd BufRead * silent loadview

I was using them to make vim remember folds/views of each opened file.

For the reasons I've yet to know, they interfere with ftdetect.

Maybe some can shed a light on this.

Have a nice day

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions