From owner-freebsd-questions@FreeBSD.ORG Mon Jan 26 16:15:09 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CCE4516A4CE for ; Mon, 26 Jan 2004 16:15:09 -0800 (PST) Received: from ms-smtp-03.rdc-kc.rr.com (ms-smtp-03.rdc-kc.rr.com [24.94.166.129]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0117343D3F for ; Mon, 26 Jan 2004 16:13:09 -0800 (PST) (envelope-from mcabanatuan@wi.rr.com) Received: from ms-mss-01 ([10.15.6.21])i0R0CN5Z023312 for ; Mon, 26 Jan 2004 18:12:23 -0600 (CST) Received: from rdc-kc.rr.com (localhost [127.0.0.1]) by ms-mss-01.rdc-kc.rr.com (iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003)) with ESMTP id <0HS400B4FGKNLN@ms-mss-01.rdc-kc.rr.com> for questions@freebsd.org; Mon, 26 Jan 2004 18:12:23 -0600 (CST) Received: from [10.15.6.151] by ms-mss-01.rdc-kc.rr.com (mshttpd); Mon, 26 Jan 2004 18:12:23 -0600 Date: Mon, 26 Jan 2004 18:12:23 -0600 From: mcabanatuan@wi.rr.com To: rob_spellberg Message-id: <3bbe1d3bf6bc.3bf6bc3bbe1d@rdc-kc.rr.com> MIME-version: 1.0 X-Mailer: iPlanet Messenger Express 5.2 HotFix 1.12 (built Feb 13 2003) Content-type: text/plain; charset=us-ascii Content-language: en Content-transfer-encoding: 7BIT Content-disposition: inline X-Accept-Language: en Priority: normal cc: questions@freebsd.org Subject: Re: [kinda ot] writing the date into a file when saving it X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mcabanatuan@wi.rr.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jan 2004 00:15:09 -0000 as far as I know there is a check-in/check-out system in FreeBSD and other UNIX systems(rcs or revision control system) that allow you to add a $Tag to a file and it will be processed as such. iirc, you use co/ci file. then edit then check it back in. Taken from _Absolute BSD_ by; Michael Lucas - "Begin the revision-control process by checking in a file with ci(1), which is much like giving a book to the library. For example, a good file to protect with RCS is /etc/rc.conf. To start the RCS process, enter ci " - There is an excellent description on usage of this system in that book, but it's a bit drafted to post to the list. But there is a tag you can use in the file, $Id$, that shows time of last save/edit, who did it, and what version it's at. Hope that helps you any. Cheers, marc ----- Original Message ----- From: rob_spellberg Date: Monday, January 26, 2004 3:59 pm Subject: [kinda ot] writing the date into a file when saving it > dear sir or madam --- > > this may be a vi question, but i'd like to be editor-independent, > if possible. > > i want to self-document source code files when i write them to disk. > > this would include such things as path and modification time. > > ideally, within vi, i would like to have :w run a script [ that i > would write ] > that does exactly what i want. > > for years, i've been doing this more or less haphazardly during > development, until i was satisfied that the file was in its > final form. > then i would manually get it right and leave it alone. > but i'm writing too much right now to keep doing this manually and > i'm something of a nut for documentation. > > its easy enough to write a sed script to find a unique string and > do a replacement. > its only slightly more involved to write a glorified version of touch > [ which is kinda what i want, actually ]. > > maybe what i want is to go into vi [ or ex, or wherever ], > find where :w is processed and cause it to look for a script to > run. > i know about :so. > i know about !command. > neither are really "it". > > i've been googling for about an hour and coming up almost > completely empty. > maybe there's a jargon word for what i want that i don't know. > > so to get to the question: what do you folks do? > > rob spellberg > woodstock, illinois > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions- > unsubscribe@freebsd.org"