---
title: "把 Neovim 当作 git difftool 使用"
description: "只要把这段贴进你的 ~/.gitconfig"
canonical: https://oozou.com/til/use-neovim-as-a-git-difftool-57
locale: zh-Hans
date: 2020-10-13
topic: vim
---

# 把 Neovim 当作 git difftool 使用

> 只要把这段贴进你的 ~/.gitconfig

Published: 2020-10-13 · Topic: [vim](https://oozou.com/zh-Hans/til-topics/vim) ([markdown](https://oozou.com/zh-Hans/til-topics/vim.md))

只要把这段贴进你的 ~/.gitconfig

```ini
[difftool]
    prompt = true
[diff]
    tool = nvimdiff
[difftool "nvimdiff"]
    cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
```

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/zh-Hans/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
