views:

56

answers:

3

Hello all,

Here's an open ended question. I work on a lot of mssql files, and I like to have a date stamp on each. This is so I can know just by looking at the source of a stored procedure whether it's up to date or not.

I'd like to have a shortcut autocomplete key, that, if i type say, d-tab-tab, I get the current date printed to the file. And yes, I am that lazy. :)

So the question is:

  1. Is there any way of getting around this problem entirely?
  2. If not, how would you suggest solving it?

Clever ideas welcome.

A: 

Are these files in source control? If so, see whether your source control provider allows templates within the source file which get filled in with the time and date when you check in.

Jon Skeet
Good suggestion. We have SourceGear here, and I never saw such a feature before. Looking it up...
Chris
A: 

If you use Notepad (and this is possibly the only argument for using it) then F5 does the trick.

Steven Hale
A: 

What about using version control for your files and including automatic keyword expansion.

Using CVS Keyword Expansion you could put $Date: $ in the file and it will get replaced with the date of the last checkin. No typing or updating needed, it's "auto-magic".

Alex B