helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
31.2k stars 2.31k forks source link

Hot reloading config #8681

Open ModProg opened 8 months ago

ModProg commented 8 months ago

Hot reload config files on changes.

When one is using multiple instances, one needs to either restart or manually reload the config in all of them. I know that helix will move to a programmable config, but that does not prevent hot reloading (e.g. wezterm also does it with its lua config file).

(I just found that one can use pkill with a user signal, maybe this just needs to be better documented https://github.com/helix-editor/helix/issues/7459)

ckcr4lyf commented 3 days ago

You can also reload it via :config-reload command, which is arguable easier from within the editor (and of course you could bind this to something).

ModProg commented 2 days ago

well my use case is switching between light and dark mode from a script. so I'm not inside an editor. And I want to update all open instances of helix

aukeroorda commented 2 days ago

You can use ps to get all instances of helix, and send a signal to reload the config on each

ModProg commented 2 days ago

You can use ps to get all instances of helix, and send a signal to reload the config on each

yes, that is exactly what I'm currently doing .