如何在git-commit上启用vim中的拼写检查 [英] How to enable spellcheck in vim on git-commit
本文介绍了如何在git-commit上启用vim中的拼写检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在编辑git commit消息的情况下,我试图在Vim中启用该拼写.文件名是固定的,因此autocmd将无济于事.我在初始消息中放入了Modeline,但是 ftpplugin/gitcommit.vim
禁用了Modeline.
I am trying to enable the spell in Vim in case of editing the git commit message.
The filename is fixed, so autocmd won't help.
I've put a modeline in the initial message, but the ftpplugin/gitcommit.vim
disables the modeline.
对git-commit大小写具有自定义vim设置的方法是什么?
What is the way to have custom vim settings for git-commit case?
推荐答案
git commit msg的文件类型为 gitcommit
.您可以在该文件类型上添加autocmd,例如:
git commit msg has filetype gitcommit
. You can add autocmd on that filetype, for example:
autocmd FileType gitcommit setlocal spell
您vim中的所有提交消息都应激活拼写检查.
All commit message in your vim should have spell check activated.
这篇关于如何在git-commit上启用vim中的拼写检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文