git-commit(1) vim ftplugin update…
Par MadCoder,
Monday 26 November 2007 à 10:30 ::
Geeky
Dear vim-ers, yes I know my git.vim ftplugin was kind of a dirty hack, and that it didn't worked that well.
Since a few days, git.git next branch shows relative paths in git-status(1) and that was the last hit to my already not that stable hack. So I raised the question on the git mailing list on how to do that plug-in properly, and it happens there is a perfect solution, that was here from day 1…
So here is a new release of the plugin that uses the special index[1] git-commit(1) builds for the occasion, hence can use git-diff(1) directly instead of parsing clumsily the commit buffer.
Direct benefits:
- it does renaming detection well;
- it works correctly when you are --amend'ing or committing something that was pushed to the index, and that the corresponding files have non staged local changes;
- it's damn fast (even when you commit more than 10 files);
- you can even hide whitespaces changes, just add
let git_diff_opts = "-C -C -w -b"in your .vimrc and you're done !
Notes
[1] or commit staging area ;D

Commentaires
1. Le Friday 30 November 2007 à 23:23, par Jan Larres
Ajouter un commentaire