I'm using nvim v0.4.3 and am trying to apply some of the tricks + alpha (e.g. disabling substitution preview) to make editing large files faster.
I want to do that even to unnamed buffers (i.e. buffers without actual filenames), but I don't know how to get the size of the current buffer's content in vim script.
For named buffers, one can use getfsize()
but it doesn't work for unnamed buffers.
g<C-g>
displays the size in bytes, but I want to get the size info in vim script. It looks like getbufinfo()
doesn't return the size info.
Is there any way to do it?
Thank you.
:help g_CTRL-G
, so one great piece of advice with (Neo)Vim is to always start with the help system, which is really thorough!