I'm writing TypeScript and there is a command npx tsc --watch that will (over)write to an output file every time the source file is changed. I open one split for each of these files. But when I save the source file the output file didn't get updated. How?

As the following img indicates: I've saved the file on the left, but the file on the right isn't changed/synced. I'm willing to record the entire process if someone really want to help me solve this tricky problem.

  • Not sure if I understand correctly. Please check the 'backupcopy' option Commented Dec 10, 2021 at 10:24
  • 1
    try to explain your problem correctly. The title talks about buffer being updated in a split window, but you are actually writing something like writing a file. So what exactly is your problem? What do you want to achieve? Very unclear to me. Commented Dec 10, 2021 at 11:47
  • 1
    It's a long shot, but are you looking for something like autoread?
    – Biggybi
    Commented Dec 10, 2021 at 12:21
  • 1
    Huh? If I :w write a file and the output does not appear on the filesystem, that is considered a bug and is really insecure. It may depend on some options however, check :h 'fsync' and :h 'backupcopy'. Commented Dec 10, 2021 at 12:54
  • 1
    the idea of 'backupcopy' is, to tell Vim how to write a file safely. It usually does create a backup copy of the current file by renaming the original file. Then it saves the file and copies metadata over. Please check the documentation for that option. BTW: I would never set the swapfile to false. You may lose data! Commented Dec 10, 2021 at 15:01

1 Answer 1


There is currently no way to achieve this in (Neo)Vim. See:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.