欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

6.buffer_multifile_edit 博客分类: vim vim buffers 

程序员文章站 2024-03-20 12:25:04
...
" buffer list
    :files  :buffers    :ls

touch buf-1 buf-2 buf-3 buf-4
vim buf-*
:files
:buffers
:ls
-------------------
1 %a   "buff-1"                       line 1
2      "buff-2"                       line 0
3      "buff-3"                       line 0
4      "buff-4"                       line 0
bufferno    status  filename    cursorPosition

" status
a   active buffer, load and display
h   hide buffer, load not display
%   current buffer
#   switch buffer
=   readonly buffer
+   modified buffer
-   can't modifie buffer

---------------------
:bn     buffer next
:bp     buffer previous
:bf     buffer first
:bl     buffer last
:buffer Number/FileName
:ball   buffer all 
Ctrl+^/:b#   to switch buffer

:qall!    quit all 
:wall!    write all 
:badd     buffer add 
:bd       buffer delete
:m,n/%bd    delete buffer no from m to n
:bufdo{CMD}     bufdo set number. effect all buffer
:E /:bd     open directory list/back to initial buffer

:%bd     all buffer delete
相关标签: vim buffers