lambdalisue / vim-suda

🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows
MIT License
713 stars 27 forks source link

call checktime after write to warn about changed files #59

Closed aarondill closed 1 year ago

aarondill commented 1 year ago

This was first suggested in #43 and was forgotten after. This simply adds the call to the end of suda#Write().

lambdalisue commented 1 year ago

I'm not familiar with checktime so I'm not sure but is calling checktime AFTER sudo#write() make sense? I thought it should be called BEFORE to prevent unwilling overwrite.

aarondill commented 1 year ago

checktime checks if the file has changed outside vim (we just changed it with dd), and if it has, it asks the user what to do about it (ie, load the new file, or ignore)

lambdalisue commented 1 year ago

Got it. Thanks 👍