pinpox / base16-universal-manager

A universal manager to set base16 themes for any supported application
https://github.com/chriskempson/base16
MIT License
89 stars 20 forks source link

Implement mechanism to replace a block instead of rewriting the file #16

Open pinpox opened 5 years ago

pinpox commented 5 years ago

Some of the base16-supported applications have no mechanism to source other configuration files from the main config, e.g. applications that are configured via YAML. For the apps that don't allow for a source or include statement in their configuration it would be nice to be able to place a specially marked block in their config that is replaced with the newly generated content instead of rewriting the whole file

e.g. for a YAML file:


value1: foo
value2: bar

# BEGIN BASE16 MANAGED BLOCK
color1: 333333
color2: 444444
# END BASE16 MANAGED BLOCK

value3: baz

The mechanism should then just substitute the marked block