From owner-freebsd-questions@FreeBSD.ORG Mon Jan 26 14:00:01 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 ACC5416A4CF for ; Mon, 26 Jan 2004 14:00:01 -0800 (PST) Received: from ice.dls.net (ice.dls.net [209.242.10.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE0D843D45 for ; Mon, 26 Jan 2004 13:59:47 -0800 (PST) (envelope-from emailrob@emailrob.com) Received: from emailrob.com (216.145.235.171) by ice.dls.net (MX V5.3 AnFj) with ESMTP for ; Mon, 26 Jan 2004 15:59:45 -0600 Message-ID: <40158DB7.1020409@emailrob.com> Date: Mon, 26 Jan 2004 15:59:19 -0600 From: rob_spellberg User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 22:00:01 -0000 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