VIM 在文件 .git/COMMIT_EDITMSG 中设置拼写 [英] VIM set spell in file .git/COMMIT_EDITMSG

查看:16
本文介绍了VIM 在文件 .git/COMMIT_EDITMSG 中设置拼写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 git 中编辑提交文本时自动设置拼写".从 % 我看到它正在写入一个名为 .git/COMMIT_EDITMSG 的文件名.如何更新我的 .vimrc 以在编辑该文件时自动设置拼写.在线的东西

I want to "set spell" automatically when i am editing the commit text in git. From the % I see that it is writing to a filename called .git/COMMIT_EDITMSG. How do I update my .vimrc to automatically set spell on when editing that file. something on the lines

if(文件名有一个 COMMIT)

if ( filename has a word COMMIT)

设置法术

fi

推荐答案

这条线对我有用:

autocmd FileType gitcommit setlocal spell

这篇关于VIM 在文件 .git/COMMIT_EDITMSG 中设置拼写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆