Error "E382: Cannot write, 'buftype' option is set" is blocking PlugInstall

OS: Manjaro Linux x86_64
Host: ThinkPad X250
Kernel: 5.10.7-3-MANJARO
Plasma 5.20.5

Hi I am new to vim and just above the freshmen in linux
In this instance I am attempting edit to neovim rc file, but i can not save my edits due to buftype error.

nvim ~/.config/nvim/init.vim:


5 - OK: no issues found
7 ## Performance
8 - OK: Build type: Release
10 ## Remote Plugins
11 - OK: Up to date
13 ## terminal
14 - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
15 - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
16 - INFO: $COLORTERM=‘truecolor’
18 health#provider#check
19 ==================================

I edit the file, then issue PlugInstall command, which does not generate new file. I then try to save the edit, but gety the ‘buftype option is set’ error.

I am trying add an option set buftype=nofile to init.vim file but to no change, still E382.
is is a wrong file?

would someone help to resolve this? thank you.

Something is missing here - or I didn’t understand the issue.
I have and use vim, normally.
To see the difference and to check/help here I installed “neovim”.
But even after having used it … I can’t even find that file you referenced here.

Nor do I know what the meaning of

“then issue PlugInstall command”


Perhaps it’s not about neovim but about something else?

Thank you for the reply Nachlese.

that is my path of actions:
mantas  Lenovo-x250  ~  $  nvim ~/.config/nvim/init.vim
<<~: nvim - Konsole >>
Here I am adding my Plugins:

like Plug ‘sirver/ultisnips’

Plug ‘pressrvim/nercommenter’

:so %
I can see the count of Elapsed Time, but
Plugins are not loading.

I try to save file with w!
and get error E382 Buftype is set

Since my initial post for help,
added set buftype=’"" to the init.vim file as a parameter.
saved the file.
after adding plugs I did
:so %
:set buftype=""
just this time i am issuing it as a command right before
Now Plugins would compile, I can see new list is generated.

yet, the issue is that each time I add a Plug and want to compile it, i get same error E382 even if i made set buftype="" parameter as a part of my init.vim file
so, each time before PlugInstall, I have to put the :set buftype= parameter as a command for the PlugInstall to go without errors.

How can I make set buftype="" - persistent?

Thank You

something important seems to be amiss here in your description of … the issue

that file doesn’t exist (for me)
You create it, for some reason.
and then write something to it
and then write it out/save it

you seem to think that that file (location and file name) is something special
I don’t have that file.
and no idea whether I should have and/or why.

I can use nvim/neovim just like vim.
No idea what “PlugInstall” is supposed to be doing.

I believe ~/.config/nvim/init.vim is a settings file, an equivalent to vim.rc in the instance when you have VIm insted nvim. i chose neovim for python studies and use Pluginstal command to add various options of the automation etc.

thanks for trying, Nachlese

You are trying to (re)configure nvim?
I don’t even have a vim.rc file
Probably/possibly because I have never even tried to (re)configure the default vim
This is then way too advanced stuff for me and I’m out since I surely can’t help.

Not sure if the manjaro forum is the best place to ask about how to configure vim/nvim …

1 Like