Skip to content

VS Code as Merge and Diff tool #2424

Answered by stromseng
webtroter asked this question in Q&A
Discussion options

You must be logged in to vote

This almost worked for me. I wanted to use it directly in my chezmoi.toml file, instead of in a template. Therefore i converted it into the following

[diff]
command = "code"
args = ["--wait", "--diff", "{{ .Destination }}", "{{ .Target }}"]

[merge]
command = "bash"
args = [
    "-c",
    "cp {{ .Target }} {{ .Target }}.base && code --new-window --wait --merge {{ .Destination }} {{ .Target }} {{ .Target }}.base {{ .Source }}",
]

Replies: 4 comments 19 replies

Comment options

You must be logged in to vote
6 replies
@halostatue
Comment options

@webtroter
Comment options

@halostatue
Comment options

@webtroter
Comment options

@halostatue
Comment options

Comment options

You must be logged in to vote
2 replies
@twpayne
Comment options

@LegendTheo
Comment options

Comment options

You must be logged in to vote
11 replies
@ElanHasson
Comment options

@twpayne
Comment options

@fluxium
Comment options

@stromseng
Comment options

Answer selected by twpayne
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
10 participants