all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Define colon commands in viper?
@ 2002-09-03 22:25 Kai Großjohann
  2002-09-04  8:53 ` Edward O'Connor
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Großjohann @ 2002-09-03 22:25 UTC (permalink / raw)


How do I define a colon command in viper, such that `:meep' calls
the `ding' function, say?

(Actually I think I want `:make' to run the `compile' command.  But
who knows what ideas might turn up.)

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Define colon commands in viper?
  2002-09-03 22:25 Define colon commands in viper? Kai Großjohann
@ 2002-09-04  8:53 ` Edward O'Connor
  2002-09-04 17:18   ` Kai Großjohann
  0 siblings, 1 reply; 3+ messages in thread
From: Edward O'Connor @ 2002-09-04  8:53 UTC (permalink / raw)


> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Define colon commands in viper?
  2002-09-04  8:53 ` Edward O'Connor
@ 2002-09-04 17:18   ` Kai Großjohann
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Großjohann @ 2002-09-04 17:18 UTC (permalink / raw)


Edward O'Connor <ted@stewart.floobin.cx> writes:

>> 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:

You pointed me in the right direction.  I guess that it would work to
add an entry to ex-token-alist.  Thanks!

kai
-- 
A large number of young women don't trust men with beards.  (BFBS Radio)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-04 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-03 22:25 Define colon commands in viper? Kai Großjohann
2002-09-04  8:53 ` Edward O'Connor
2002-09-04 17:18   ` Kai Großjohann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.