The "this is a *scratch* buffer" message that shows up when running kak with no arguments keeps getting in my way. Someone suggested deleting it with a hook, but I like the property that I can press u to get to an empty buffer.
Maybe it can be inserted by an rc file or be made optional somehow?
This was discussed a bit in #2759 but that bug is closed.
I am not really keen on that message either, but newcomers have been complaining regularly about getting confused when they start Kakoune, type into the default buffer, quit, and nothing prevents them from losing what they typed.
I am not really tempted to add an option to control that because it feels like an ugly solution to an ugly behaviour, on the other hand I do not know how to reduce confusion on the new starters side.
Why don鈥檛 fill a regular buffer?
https://github.com/mawww/kakoune/issues/1496#issuecomment-473907027
I think this would be worse, because we either give it an arbitrary name, and :wa will often create that unwanted dummy file, or we need to add some complexity to have buffers that are only saved to a file after an explicit save, possibly with some way to to ask the user for a filename on first save...
You mark a good point about the :wa command.
Some options:
info instead of filling the buffer./tmp (that could also be useful for the *debug* buffer IMO).I really like the idea of behaving like <input placeholder="...">. The text disappears as soon as the user starts entering their own text. Vim has a welcoming message with this behavior when you start it with no args.
Could an option be implemented which sets the default scratch buffer contents? For example, I could overwrite it in my kakrc to make it empty.
Here is an alternative: the scratch buffer is populated instead with a BufCreate hook like this:
hook -group write-scratch-message global BufCreate \*scratch\* %
execute-keys i "*** This is a scratch buffer ***" <esc>
}
Then it could be ignored with set global disabled_hooks write-scratch-message.
That seems more idiomatic for Kakoune
Most helpful comment
Here is an alternative: the scratch buffer is populated instead with a BufCreate hook like this:
Then it could be ignored with
set global disabled_hooks write-scratch-message.