VIM: Get buffer byte size
It's useful when you need to check your buffer size before saving it into the disk.
function! s:BufferByteSize()
echo printf("%s %s", line2byte(line('$') + 1), "bytes")
endfunction
command! Bytes call s:BufferByteSize()
Written by Endel Dreyer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#