Deleting all empty buffers in VIM -
i have 120 buffers open in vim right now. 50% of these buffers empty files. i'd somehow use bufdo! close buffers empty. there way can say:
bufdo! (something) where (something) conditional command bdeletes current buffer if length/size of buffer zero?
the thing can think of make function reports if buffer empty or not. this:
function! bufferisempty() if line('$') == 1 && getline(1) == '' return 1 else return 0 endif endfunction " test this: echo bufferisempty()
Comments
Post a Comment