hi, I am a new Kakoune user and have been using it as my main editor for a month now. I have a question regarding the ‘:w’ command.
In vim, if a new buffer is created using the ‘:enew’ command and then the ‘:w’ command is used to write to a file, the buffer gets renamed. Subsequent writes to this buffer become successful.
In Kakoune, if I create a new buffer using ‘:e -scratch’ and then ‘:w’ command is used to write to a file, buffer does not get renamed and subsequent ‘:w’ command displays this error - 'cannot write a non-file buffer without a filename’use.
So, I usually use these commands to save a scratch buffer to a file
:rename-buffer -file “filename” and then issue ‘:w’ command.
I am wondering if this is the correct method or is there an alternative way to achieve the behavior like vim’s?