Replies: 5 comments 9 replies
-
The usual process is to edit the file in your git repository first then However, the opposite way is also simple:
Just like git! |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response @felipecrs. So again re-add the modified file? Like so:
Is this what workflow what you mean? According to this, it doesn't seem safe to do so. |
Beta Was this translation helpful? Give feedback.
-
Why is that ? What is the difference between |
Beta Was this translation helpful? Give feedback.
-
In the latest release, If you use # "vi FILE_NAME" automatically runs "chemoi edit FILE_NAME" command if the file is under management by chemoi.
# otherwise just give the all arguments to neovim
function vi() {
if [ $# -eq 0 ]; then
nvim
return
fi
# Added "--hardlink=false" option to get neovim undo available.
chezmoi verify $1 > /dev/null 2>&1\
&& chezmoi edit --watch --hardlink=false $1\
|| nvim $@
} |
Beta Was this translation helpful? Give feedback.
-
I wrote a neovim plugin that might help you edit chezmoi-managed files. Please try if anyone is interested. |
Beta Was this translation helpful? Give feedback.
-
[ Just to point out: I have read and am aware of https://github.com/twpayne/chezmoi/issues/748#issuecomment-628065878 ]
Is it possible to modify a dotfile and be in sync with my dotfile repo, without using "chezmoi edit"? Please let me explain by the following example:
chezmoi init my_repo
chezmoi add ~/.tmux.conf
chezmoi diff
, it sees that there are some changes between my git repo and local files.chezmoi update
will restore the local changes to the one from step 2Is there a way to do this the other way around?
Git repo --- to --> local file is possible
local file --- to --> git repo without chezmoi edit ?
It doesn't feel natural to me to make note of what configs I manage with chezmoi and if I want to make some changes for those config files, make them using
chezmoi edit
instead of just vim/nano.I have also looked at the following links before posting this:
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions