New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apply file changes on write with edit --apply #752
Comments
|
Interesting idea, and related to what @Zackhardtoname is asking for. This should be fairly straightforward to implement, but I'd like to get the v2 rework done first. I expect to add this though :) |
|
So I randomly looked into this thread and felt a bit bored and decided to create my first vim plugin. It solves this problem by getting the current PID of the vim process, looks up the parent PID and sees if chezmoi was invoked( Feel free to use it! https://github.com/lilja/vim-chezmoi |
|
+1 for this! I'd love to get back the ability to make a change to my .vimrc, save, re-source, and test if my change results in the expected functionality all without ever heaving to leave the editor. @twpayne if you're too busy right now and this doesn't conflict with the v2 rework, I'd be happy to get a PR up for this. I'd just need a little direction on the design i.e. would you want this to become the default behavior or introduce a new flag with |
|
@camgraff Thanks for your offer - it's not quite time to work on this yet. At the moment, the v2 branch is nearing completion (please do check out the |
|
I hacked this together which auto applies on each save (and not only when the editor exits. It can be convenient when editing some configuration where a tight edit-test-loop is required. Use at your own risk! ;-) |
My current workflow for changing my config is
then I've to write quit my
$EDITORto apply the changes. It would be cool, if I didn't have to close my editor and only write the file (:win vim). Chezmoi could listen on file changes (with something like inotify) and then apply them.Usecases are:
This is only a minor inconvenience so feel free to close the issue if you don't see the need for it.
Anyway, keep up the good work with chezmoi!
The text was updated successfully, but these errors were encountered: