Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
#177 led to the
:reload
command which would allow us to reload a file from disk. 🎉 In November, #1125 was opened regarding automatically detecting external file changes. In response to that issue, #588 was created in an attempt to implement a proper file watcher. While I'm totally in favour of this work, I would also like to open up the discussion for an alternative implementation in the meantime.Coming from Vim, there's :checktime. It checks the modification time of the file on disk, and prompts the user to take action if the file changed outside of Vim. Running this upon save would save you from accidentally overwriting a file that was changed elsewhere and would pair really nicely with the existing
:reload
command.Now, I'm not sure whether or not this would be feasible given that
:checktime
would have to be implemented as a sys call (thinkstat
), and sys calls can be expensive.In any case, I'd love to hear your thoughts. 🙂
Beta Was this translation helpful? Give feedback.
All reactions