Kakoune: Notify the user when the file underlying an open buffer was removed

Created on 19 Oct 2017  路  4Comments  路  Source: mawww/kakoune

Hi,

Currently, there's no notification system that would warn a user that the file that they opened/created isn't present on the disk anymore.

HTH.

Most helpful comment

I just want a way to know I'm not editing a file that is not backed by the filesystem anymore, I thought about a modal.

$ rm main.cc
"The file associated with this buffer was removed, do you want to delete it? y/n"

If yes, the buffer is removed, otherwise the new flag is assigned back to it.

All 4 comments

Can you suggest the behaviour you'd like to see ? Detecting the file is gone seems easy enough, but what to do with that is less clear.

A simple popup message similar to the one that appears when a file was changed would be enough for me.

What would that popup propose as options ? we cannot really reload the file, so it would just be a notification. In that case wouldn't it be better to use a non modal info box (and maybe to add back the 'new' flag on the file) ?

I just want a way to know I'm not editing a file that is not backed by the filesystem anymore, I thought about a modal.

$ rm main.cc
"The file associated with this buffer was removed, do you want to delete it? y/n"

If yes, the buffer is removed, otherwise the new flag is assigned back to it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MasterOfTheTiger picture MasterOfTheTiger  路  4Comments

alexherbo2 picture alexherbo2  路  4Comments

Parasrah picture Parasrah  路  4Comments

basbebe picture basbebe  路  4Comments

a12l picture a12l  路  3Comments