Monday, April 26, 2010

How to embed VCSInfo into file comments?

Hi,

I have recently discovered the wonderful

:VCSInfo

command from the vcscommand.vim script. Below is a sample output from one
of my files.

1 Path: Identifier.cpp$
2 Name: Identifier.cpp$
3 URL: svn://localhost/dev/robolab/cpp/src/Identifier.cpp$
4 Repository Root: svn://localhost$
5 Repository UUID: be881e60-0d39-4e2c-82cd-b428fd5aaff4$
6 Revision: 702$
7 Node Kind: file$
8 Schedule: normal$
9 Last Changed Author: kfeng$
10 Last Changed Rev: 661$
11 Last Changed Date: 2010-03-23 10:11:51 +0800 (Tue, 23 Mar 2010)$
12 Text Last Updated: 2010-04-24 19:16:15 +0800 (Sat, 24 Apr 2010)$
13 Checksum: da0f4f13bdd9addb1354b76f56d70c08$

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

My question is, is there a way to get vim to automatically pull this
information (or part of the information, for example lines 9 through 12)
into file comments? For example, if I have something like this:

/* Some comments....
* ...
* _PUT_VCSInfo_HERE
*/

so that _PUT_VCSInfo_HERE is inserted with lines 9 through 12 from above
every time I commit back into VCS?

I am guessing that there is either a macro/script way of doing this, but I
am too much of a vim-noob to figure it out, or it is so common that someone
has created a script to do it already.
Any suggestions? TIA.

- Ken

--
View this message in context: http://old.nabble.com/How-to-embed-VCSInfo-into-file-comments--tp28368443p28368443.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Subscription settings: http://groups.google.com/group/vim_use/subscribe?hl=en

No comments: