Skip to main content
edited tags
Link
Friedrich
  • 3.3k
  • 1
  • 13
  • 26
Source Link
Anon
  • 905
  • 7
  • 16

Is it possible to have vim run a command every time save `:w` is invoked?

I am editting typescript now, and I'd like to be able to have it so, whenever :w is invoked, the shell runs tsc compiling my new save.

This beats having to !tsc every time.

Does something like this exist? A build or toolchain command is also an acceptable answer, as long as it can be done in one short command.