RFE: "HTML" Keyword expansion

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

RFE: "HTML" Keyword expansion

Post by mlippert » Fri Jan 14, 2005 4:51 pm

I recognize that HTML Keyword expansion is implemented exactly the way that Microsoft implemented it in SourceSafe.

However with just a little more thought it could be infinitely more useful.

Currently

Code: Select all

$$Author:$
expands to

Code: Select all

$$Author:-->Fred<!--$
This allows HTML text such as:

Code: Select all

Last edited by: <!-- $$Author: -->Fred<!-- $ -->
By just allowing the prefix and suffix to be specified by the user (say on a repository basis), a prefix of "-->" and a suffix of "<!--" works for HTML but a prefix of '*/"' and a suffix of '"/*' would work for C and C++ as in:

Code: Select all

const char szAuthor[] = /*$$Author:$*/;
expands to:

Code: Select all

const char szAuthor[] = /*$$Author:*/"Fred"/*$*/;
As long as this functionality exists, it might as well be general purpose rather than specific to HTML.

Mike

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Sat Jan 15, 2005 2:23 pm

Mike:

Keyword expansion is based on file name extension. By defining a begin / end pair for the type, you can define any marks for the a type of file.


For example:

Ext - .c
begin /*
end */

Ext .cpp
begin //
end

Ext .bas
begin '
end

Ext .html
begin <!--
end -->


You can view / edit these types within the Admin Tool for the Repository options.

I usually use Keyword expansion to expand within a comment ( as the sample data provided above ). However, by reversing the begin / end pair ( */ and /* ), you could assign the Author to a char pointer in your Fred example.

HTH
Jeff Clausius
SourceGear

Guest

Post by Guest » Sun Jan 16, 2005 1:58 pm

Hi Jeff,
That's actually not how it works, although adding another begin end pair to the ones you are referring to would be even better than defining only 1 per repository.

The begin end pairs you are referring to are only used for multiline keywords such as history. They are not used by any of the single line keywords such as author. That is why Microsoft came out w/ that lame extension that is specific to HTML, which is used when the single line keyword is preficed by 2 dollar signs instead of 1.

I don't have access to the help right here but I'm pretty confident that I have the jist correct.

Mike

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Sun Jan 16, 2005 1:59 pm

Oops, sorry didn't realize I wasn't logged in for the previous post until I saw it was posted as Guest.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Sun Jan 16, 2005 2:52 pm

OK. I thought it worked differently. I'll look into this more indepth during the week, and report back.
Jeff Clausius
SourceGear

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Sun Jan 16, 2005 8:56 pm

Mike:

Just spent some time on testing / reading the manual. I don't do too much HTML, so I didn't even know there was a special HTML expansion pattern. When I read the title of the post, I assumed you were referring to "HTML" as a file extension.

In any case, I found that this request had already been made. I added your name to this request.
Jeff Clausius
SourceGear

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Sun Jan 16, 2005 10:35 pm

Thanks Jeff.
I had considered making this request of the black hole that is Microsoft feature requests ages ago when SourceSafe first introduced this option.

I'm requesting it of you guys because it is much more likely to get implemented, and at least I was heard and responded to (thank you very much! SourceGear support is awesome).

Mike

Post Reply