首页 > 解决方案 > Git vim 编辑器配置

问题描述

我在 Windows 中工作,我使用 vim 之类的默认编辑器进行提交。我想配置 vim 以使用 Windows 文件格式 (CRLF) 保存提交

我该怎么办?git 的 vim 配置在哪里?

标签: windowsgitvimeditorcommit-message

解决方案


git 提交消息插件是~/.vim/ftplugin/gitcommit.vim. 设置这个:

setlocal fileformat=dos

http://vimdoc.sourceforge.net/htmldoc/options.html#%27fileformat%27


推荐阅读