filetype setting lost after reloading all files in buffer

前端 未结 3 1027
失恋的感觉
失恋的感觉 2020-12-16 19:15

After running :bufdo e! All my files lose their filetype setting and I have to manually run :set ft=XXX in each file.

Anyone know how to so

3条回答
  •  无人及你
    2020-12-16 19:52

    The bufdo command doesn't update syntax hightlighting for performance reasons:

    From vim docs:

    Note: While this command is executing, the Syntax autocommand event is disabled by adding it to 'eventignore'. This considerably speeds up editing each buffer

    You can update the syntax highlighting for affected buffers by re-running:

    :syntax on

提交回复
热议问题