Skip to content

Instantly share code, notes, and snippets.

@SeijiEmery
Created August 23, 2016 05:53
Show Gist options
  • Save SeijiEmery/fd0f269a8d2792eae41a18d6a3f4aa58 to your computer and use it in GitHub Desktop.
Save SeijiEmery/fd0f269a8d2792eae41a18d6a3f4aa58 to your computer and use it in GitHub Desktop.
Interactive file compilation
Depends on the awesome watchdog python library and when-changed script / utility:
https://github.com/joh/when-changed/blob/master/whenchanged/whenchanged.py
This is a quick test to demonstrate interactive compilation (IDE-light) with just sublimetext, clang and bash
(detects when a file is changed and recompiles + runs for 1 .c file).
Pretty basic, but could be extended w/ a custom utility capable of watching an entire directory / multiple
paths and doing the same (maybe). I would need to write my own thing on top of watchdog ofc though.
when-changed foo.c "clear; clang -o foo foo.c > compile_log.txt && ./foo || cat compile_log.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment