0

I have just tried to set up neovim from this article. I am running on Windows 10. I have installed neovim through chocolatey, and I am trying to get Vim Plug to work. After pasting

call plug#begin("~/.vim/plugged")
  " Plugin Section
call plug#end()

"Config Section

into my init.vim file, I get the following error:

Error detected while processing C:\Users\advai\AppData\Local\nvim\init.vim:
line    1:
E492: Not an editor command: <ff><fe>c
Press ENTER or type command to continue

After trying to run nvim +PlugInstall, I get the following error:

Error detected while processing C:\Users\advai\AppData\Local\nvim\init.vim:
line    1:
E492: Not an editor command: <ff><fe>c
Error detected while processing command line:
E492: Not an editor command: PlugInstall
Press ENTER or type command to continue

Is there a LF/CRLF issue? The init.vim file has LF line endings right now.

1
  • 1
    Welcome to Vi and Vim! Thanks for posting a detailed question, including all the steps you followed and error messages you got, that really makes it easy to figure out the issue. – filbranden Dec 12 '20 at 19:27
0

This <ff><fe> is actually the BOM (Byte order mark), which is somewhat common on Windows and might have appeared as you copied and pasted from the clipboard on that platform. This is not exactly the same as an LF/CRLF issue, but it's somewhat similar in that it tends to happen more often on a specific platform, so you could qualify it as a platform-specific issue.

On Vim and NeoVim, you can typically remove the BOM from a file by using the following command:

:set nobomb

(See :help 'bomb' for details. LOL, from the name of the option you can guess how Vim's author feels about the use of the BOM.) 🤣

Once you change that setting, write the file back with :w and quit Vim, the file should have been fixed now.


Note that the BOM is typically more common on the UTF-16 or UTF-32 variants of Unicode (UTF-16 is common on Windows, while UTF-8 is the most common one in Linux/Unix/Mac, that's in part why you see the BOM most often on Windows.)

It is possible that your file is also using UTF-16 encoding, which while that should not break its use within Vim, you might want to stick to UTF-8 if possible (even on Windows.)

You can check the current file-encoding with the command :set fenc? on Vim. If you want to switch it to UTF-8, use :set fenc=utf-8 followed by a :w.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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