Re: [PATCH 1/1] Tell vim the textwidth is 75.
From: Catalin Marinas <hidden>
Date: 2016-06-15 22:42:02
Junio C Hamano [off-list ref] wrote:
I do not do Porcelain, but wouldn't it be nicer if we had a Porcelain neutral "commit log template file" under $GIT_DIR somewhere? 'vim: textwidth=75' is completely useless for somebody like me (I almost always work inside Emacs).
StGIT uses .git/patchdescr.tmpl as the template, where people can put the a line like "STG: vim: textwidth=75" which will be automatically removed. I won't include this patch since it is up to the user to define whatever setting he/she wants for his editor (I use emacs myself and add something like "STG: -*- mode: text; -*-" on the first line)
Cogito seems to use $GIT_DIR/commit-template for that purpose. Can't users put that "vim:" hint there, and if StGIT does not use a commit template, patch it to use the same file as Cogito does?
I would use a neutral commit template, only that it should have a neutral prefix as well for the lines to be removed (neither STG nor CG but GIT maybe). The $GIT_DIR/commit-template is fine as a file name. -- Catalin