From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Edward O'Connor Newsgroups: gmane.emacs.help Subject: Re: Define colon commands in viper? Date: Wed, 04 Sep 2002 08:53:44 GMT Organization: RoadRunner - West Sender: help-gnu-emacs-admin@gnu.org Message-ID: <87n0qzt2bs.fsf@stewart.floobin.cx> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031130331 31376 127.0.0.1 (4 Sep 2002 09:05:31 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 4 Sep 2002 09:05:31 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17mW6L-00089q-00 for ; Wed, 04 Sep 2002 11:05:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mW7u-0004wA-00; Wed, 04 Sep 2002 05:07:06 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!snoopy.risq.qc.ca!newsfeed.news2me.com!news-west.rr.com!cyclone.kc.rr.com!news.kc.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-NNTP-Posting-Host: 24.161.187.13 Original-X-Complaints-To: abuse@rr.com Original-X-Trace: twister.socal.rr.com 1031129624 24.161.187.13 (Wed, 04 Sep 2002 01:53:44 PDT) Original-NNTP-Posting-Date: Wed, 04 Sep 2002 01:53:44 PDT Original-Xref: nntp.stanford.edu gnu.emacs.help:104469 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1031 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1031 > How do I define a colon command in viper, such that `:meep' calls > the `ding' function, say? There's probably a better way to do this, but here's what I do in my .emacs file WRT :open and the like: ;; Make :o and :open work in viper. Why isn't this the default? (defadvice ex-cmd-assoc (after ted-open-fix activate) "Make vi's :o and :open work correctly." (when (string-equal (car ad-return-value) "open") (setq ad-return-value '("open" (find-file (read-file-name "Find file: ")))))) Perhaps you could do something similar for :meep, or :make? Ted -- Edward O'Connor ted@oconnor.cx