Build jar file under Linux encountered coding problem, so want VI T.jar, in Save is error: E382:cannot write, ' buftype ' option is set
Workaround:
You can use the following name to view Buftype settings, when Buftype=nofile, cannot save the file, only when buftype= empty, can save
>> VI T.jar
>>: Verbose set Buftype
At the bottom of the file, you can see
Buftype=nofile
Last set From/usr/share/vim/vim74/autoload/zip.vim
Press ENTER or type command to continue
To modify the Buftype method:
>> VI T.jar
>>: setlocal buftype=
>>: Verbose set Buftype
At the bottom of the file, you can see
Buftype=
You can then modify what you want to modify, and then save the
Like what
>>: Set Fileencoding=latin1
>>: wq!
This will modify the success
If you want to change back to the original settings before saving, you can use the following command:
>>: setlocal buftype=nofile
The default is saved and changed back to Nofile
VI is failed with error "E382:cannot write, ' buftype ' option was set" in Linux