6.buffer_multifile_edit

阅读更多
" 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)