VI is failed with error "E382:cannot write, ' buftype ' option was set" in Linux

Source: Internet
Author: User
Tags postgresql

Build jar file under Linux encountered coding problem, so want VI T.jar, in Save is error: E382:cannot write, ' buftype ' option is set


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


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


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

Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.