Maybe someone has a way to always start vim with scratch buffer? Ideally always with same buffer id (again ideally 1:) ), but maybe just simply named scratch buffer with chose name. Also if starting with some files scratch buffer should be created in background, and on startup opened file should be shown as is standard. After some googling i found command:
au VimEnter * if empty(expand('%')) | set buftype=nofile | endif
but I can understand that will only work if vim is started with no file. Sadly I don’t have enough vim scripting knowledge to hack it up to what I want, so maybe someone can help?
There’s a plugin for that of course :-).
And another one…
Now You can set it like
(It works for the second plugin!)
And one more (where the code is the documentation).