zoukankan      html  css  js  c++  java
  • How do I close a single buffer (out of many) in Vim?

    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.


  • 相关阅读:
    C# 小算法1
    函数 y=x^x的分析
    随机数
    对拍
    Cube Stack
    Permutation
    一笔画问题
    康托展开&&康托逆展开
    待完成
    小错误 17/8/10
  • 原文地址:https://www.cnblogs.com/vigorz/p/10499210.html
Copyright © 2011-2022 走看看