The error you are seeing looks more like a Bash error than a Vim error. For example, here is what I get when I run your command from Bash:
$ filetype plugin indent on
-bash: filetype: command not found
Note that error identifier (i.e., EXXX
) characteristic of Vim error messages does not appear in the output. Here is what I get when I try to run an invalid command (e.g., :invalid
) from Vim:
E492: Not an editor command: invalid
Looking through the Vim source we can see that if Vim produced such a message we would expect to see an E371 identifier. As a sanity check, from the How to debug my vimrc link that user D. Ben Knoble provided in his comment to your question, open Vim in a bare state:
vim -u NONE -U NONE -N
Then query the filetype
option by executing the command :filetype
. Here is the result on my machine:
filetype detection:OFF plugin:OFF indent:OFF
If this works, then it is a pretty good indication that the problem is stemming from your vimrc and the debugging article provided can guide you further along that process.
:version
/command -v vim