1
0
Fork 0
mirror of https://github.com/kastdeur/dotfiles.git synced 2024-12-22 09:13:33 +01:00

[git] Enable diffing documents by default

This commit is contained in:
Eric Teunis de Boone 2022-03-30 18:44:43 +02:00
parent d5d0a168f5
commit 97ab089316
3 changed files with 15 additions and 1 deletions

View file

@ -8,6 +8,7 @@
- link: - link:
~/.bashrc: bash/bashrc ~/.bashrc: bash/bashrc
~/.bash_profile: bash/profile ~/.bash_profile: bash/profile
~/.config/git/attributes: git/attributes
~/.config/git/config: git/config ~/.config/git/config: git/config
~/.config/git/ignore_global: git/ignore ~/.config/git/ignore_global: git/ignore
~/.config/geany/keybindings.conf: geany/keybindings.conf ~/.config/geany/keybindings.conf: geany/keybindings.conf

12
git/attributes Normal file
View file

@ -0,0 +1,12 @@
# Automatically normalize line endings for all text-based files
#* text=auto
# Documents
*.doc diff=pandoc
*.DOC diff=pandoc
*.docx diff=pandoc
*.DOCX diff=pandoc
*.odt diff=pandoc
*.ODT diff=pandoc
*.pdf diff=pdf
*.PDF diff=pdf

View file

@ -8,6 +8,7 @@
default = matching default = matching
[core] [core]
excludesfile = ~/.config/git/ignore excludesfile = ~/.config/git/ignore
attributesfile = ~/.config/git/attributes
[color] [color]
ui = auto ui = auto
[color "status"] [color "status"]
@ -20,7 +21,7 @@
[diff] [diff]
mnemonicPrefix = true mnemonicPrefix = true
tool = vimdiff tool = vimdiff
[diff "rst"] [diff "pandoc"]
textconv = pandoc --to=rst textconv = pandoc --to=rst
[diff "pdf"] [diff "pdf"]
textconv = pdf2txt textconv = pdf2txt