I open several files in Vim by, for example, running

vim a/*.php

which opens 23 files.

I then make my edit and run the following twice

:q

which closes all my buffers.

How can you close only one buffer in Vim?

Answer:

A word of caution: "w does not stand for write but for wipeout!"

More from manuals:

:bd

Unload buffer [N] (default: current buffer) and delete it from the buffer list. If the buffer was changed, this fails, unless when [!] is specified, in which case changes are lost. The file remains unaffected.

If you know what your're doing, you can also use :bw

:bw

Like |:bdelete|, but really delete the buffer.

How do I close a single buffer (out of many) in Vim?的更多相关文章

  1. Java Buffer

    1.1 NIO Buffers - Class java.nio.Buffer NIO data transfer is through the so-called buffers implement ...

  2. Buffer Data

    waylau/netty-4-user-guide: Chinese translation of Netty 4.x User Guide. 中文翻译<Netty 4.x 用户指南> h ...

  3. Buffer Data RDMA 零拷贝 直接内存访问

    waylau/netty-4-user-guide: Chinese translation of Netty 4.x User Guide. 中文翻译<Netty 4.x 用户指南> h ...

  4. 以moosefs为例介绍iozone的使用方法

    一.编译安装 首先到官网下载iozone的稳定版源码 http://www.iozone.org/ 然后解压编译 tar -vxf iozone3_458.tar cd iozone3_458/src ...

  5. JBD日志的定位、分析和恢复

    在上一篇中,我们介绍了Ext3文件系统的日志可以看做一个文件,由JBD进行管理.自然而然引出如下这些问题: 1)如何定位ext3日志文件和查看日志文件的裸数据? 2)ext3日志文件数据在物理上是如何 ...

  6. vertx简单服务创建

    import java.util.HashMap;import java.util.Map; import org.slf4j.Logger;import org.slf4j.LoggerFactor ...

  7. 【GoLang】GoLang 官方 对 error 处理的意见

    The Go Blog Errors are values 12 January 2015 A common point of discussion among Go programmers, esp ...

  8. RAC的QA

    RAC: Frequently Asked Questions [ID 220970.1]   修改时间 13-JAN-2011     类型 FAQ     状态 PUBLISHED   Appli ...

  9. Android官方多媒体API Mediacodec翻译(一)

    因近期工作调整,关于Mediacodec部分的翻译会暂停,后续有时间一定补上,非常抱歉. 本文章为根据Android Mediacodec官方英文版的原创翻译,转载请注明出处:http://www.c ...

随机推荐

  1. (转载)linux 常用命令

    出处:http://www.cnblogs.com/vamei $ 命令行提示符 粗体表示命令 斜体表示参数 filename, file1, file2 都是文件名.有时文件名有后缀,比如file. ...

  2. Transport Layer Protocols

    1 End-to-end Protocols(端到端协议) 传输层协议往往是主机对主机(host-to-host)或者说是端到端(end-to-end).通常希望传输层协议可以提供如下service: ...

  3. LeetCode算法题(长期更新)

    1.给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标. 你可以假设每种输入只会对应一个答案.但是,你不能重复利用这个数组中同样 ...

  4. 从理论到实践 全面理解HTTP/2

    前言 为了降低加载时间,相信大多数人都做过如下尝试 Keep-alive: TCP持久连接,增加了TCP连接的复用性,但只有当上一个请求/响应完全完成后,client才能发送下一个请求 Pipelin ...

  5. VRRP&HSRP

    HSRP 活跃路由器和备用路由器都会向组播地址 224.0.0.2  UDP 1985  端口发送hello消息. VRRP组中有一台主用路由器(Master),以及一台或多台备用路由器(Backup ...

  6. [视频]K8飞刀 Discuz! X 系列(1.5 2.5 3.x)产品升级漏洞GetShell教程

    K8飞刀 Discuz! X 系列(1.5 2.5 3.x)产品升级漏洞GetShell教程 https://pan.baidu.com/s/1bnv2euz

  7. jQuery操作select下拉框的text值和value值的方法

    1.jquery获取当前选中select的text值 $("#select1").find("option:selected").text(); 2.jquer ...

  8. Android的Fragment中的互相通信-桥梁activity

    Android的Fragment中的互相通信-桥梁activity 效果图如下: 项目结构图如下: Fragment1: package com.demo.fragmenttongxin; impor ...

  9. salesforce lightning零基础学习(九) Aura Js 浅谈二: Event篇

    上一篇介绍了Aura Framework中 Component类的部分方法,本篇将要介绍Event常用的方法. 1. setParam (String key , Object value):设置事件 ...

  10. leetcode — zigzag-conversion

    /** * Source : https://oj.leetcode.com/problems/zigzag-conversion/ * * Created by lverpeng on 2017/6 ...