3

I recently started trying out the VCSCommand plugin for vim to work with several subversion repositories. Every time I commit a change from vim using VCSCommit, aka. the key combo (\cc), I keep getting these extra blank lines added to my commits.

Here's an example:

------------------------------------------------------------------------
r72 | smingolelli | 2012-12-15 15:58:17 -0500 (Sat, 15 Dec 2012) | 2 lines

Trying from Fedora 14 w/ svn 1.6.17 and vim 7.3 1-315 w/ svn:eol-style=native for compile.sh.

------------------------------------------------------------------------

If I do the same commit from the command line:

------------------------------------------------------------------------
r73 | smingolelli | 2012-12-15 16:06:44 -0500 (Sat, 15 Dec 2012) | 1 line

Trying from Fedora 14 w/ svn 1.6.17 and vim 7.3 1-315 w/ svn:eol-style=native for compile.sh from command-line.
------------------------------------------------------------------------

So it would seem to be something with the VCSCommand plugin for vim but I'm not seeing what the issue is. Additionally I tried doing the same test with multiple versions of svn, vim, and the VCSCommand plugin and still got the same behavior.

Versions

  • SVN Client OSes: Fedora 14 & CentOS 6
  • SVN Server OS: Windows Vista
  • SVN Server Version: 1.6.2
  • VCSCommand Plugin: vcscommand-1.99.46.zip, ver: 1.99.46 date: 2011-12-06

Fedora 14

  • SVN Client Versions tried: 1.6.17
  • VIM versions tried: 7.3 (2010 Aug 15, compiled Sep 21 2011 09:27:09) Included patches: 1-315

CentOS 6

  • SVN Client Versions tried: 1.6.11, 1.6.19 -- (NOTE: The VCSCommand plugin didn't work with svn1.7+ & VIM 7.3)
  • VIM versions tried: 7.2? & 7.3 (2010 Aug 15, compiled Dec 15 2012 14:08:39) Included patches: 1-393
slm
  • 15,396
  • 12
  • 109
  • 124

1 Answers1

0

Vim has a "feature" called eol, which is generally on by default. You can turn it on using :set eol. This adds an extra newline at the end of each text file if it does not already have one. This exists due to some older software (most notably cron) requiring a newline at the end of a file in order to read it properly. Most, if not all, of this older software has been updated to not have this requirement, but vim still works as it did before.

You can turn this feature off using :set noeol. It removes a single newline at the end of the file, if there is one. This is fine, if you don't want a newline at the end of your text file, or in your case, at the end of your commit comment. Put set noeol at the top of your .vimrc file and this setting will be on all the time, but all your files will lose their newlines at the very end of the file as long as the noeol setting is in effect.

One option is to use :set binary, which turns off text processing, and leaves your newlines alone. It does disable some other text-related features, though. Check out the documentation to see which features will go away if you choose this option. You can also put this setting in your .vimrc file.

Michael Krebs
  • 1,212
  • 10
  • 11
  • Sorry I completely lost track of this Q&A. I tried this and I still get the same problem mentioned in the Q above, mainly an extra blank line b/w the comment and the dash lines denoting the previous comment. – slm Dec 22 '13 at 23:52