As title. I'm a user of Neovim and am trying to learn something very basic. My point is that I don't want to set things that will be enabled by Vim by default. And what's the relation between

:filetype on
:filetype indent on
:filetype plugin on

Say I have set the second one do I still need to set the first one? Can I say that the first one is a combination of the second and the third one?

1 Answer 1


From :h filetype-overview

Overview:                   *:filetype-overview*
command                     detection   plugin      indent ~
:filetype on                on          unchanged   unchanged
:filetype off               off         unchanged   unchanged
:filetype plugin on         on          on          unchanged
:filetype plugin off        unchanged   off         unchanged
:filetype indent on         on          unchanged   on
:filetype indent off        unchanged   unchanged   off
:filetype plugin indent on  on          on          on
:filetype plugin indent off unchanged   off         off

To see the current status, type: >
The output looks something like this: >
    filetype detection:ON  plugin:ON  indent:OFF

From :h nvim-defaults

2. Defaults                             *nvim-defaults*

- Filetype detection is enabled by default. This can be disabled by adding
  ":filetype off" to |init.vim|.

As expected, executing $nvim --clean +filetype outputs

filetype detection:ON plugin:ON indent:ON
  • Thank you for the detailed answer and clear reference, now I understand it! (finally need to read these ideas as I'm learning how to use vimtex) Mar 9 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.