Stop git from changing line endings on Windows and add support for editorconfig in vim

This commit is contained in:
2023-03-16 16:26:18 -04:00
parent 4464e4f681
commit 28c88ca5f1
5 changed files with 59 additions and 6 deletions

View File

@@ -1,5 +1,14 @@
[code]
editor = vim
editor = vim
[core]
# Don't change LF line endings and if a CRLF is found then change it to LF on a commit.
autocrlf = input
# Don't change any line endings. That means if a file has CRLF line endings
# the carriage return will stay. I'm only worknig with LF line endings on
# Windows now except for .bat files which are forced to have CRLF via
# per-project editorconfig and gitattribute files. I want those files to
# still have CRLFs when modified on Linux.
#
# I used these posts for reference:
# https://markentier.tech/posts/2021/10/autocrlf-true-considered-harmful/
# https://troyready.com/blog/git-windows-dont-convert-line-endings.html
#
autocrlf = false