zsh-users
 help / color / mirror / code / Atom feed
* Applying a bindkey command to multiple keymaps
@ 2011-05-31 16:32 David Evans
  2011-05-31 16:55 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: David Evans @ 2011-05-31 16:32 UTC (permalink / raw)
  To: zsh-users

I want to perform a particular bindkey operation on both the viins and vicmd keymaps. Am I stuck with

bindkey -v
...
bindkey foo
bindkey -a foo

?



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

* Re: Applying a bindkey command to multiple keymaps
  2011-05-31 16:32 Applying a bindkey command to multiple keymaps David Evans
@ 2011-05-31 16:55 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2011-05-31 16:55 UTC (permalink / raw)
  To: zsh-users

On Tue, 31 May 2011 17:32:16 +0100
David Evans <David.Evans@cl.cam.ac.uk> wrote:
> I want to perform a particular bindkey operation on both the viins
> and vicmd keymaps. Am I stuck with
> 
> bindkey -v
> ...
> bindkey foo
> bindkey -a foo

vibindkey() {
  bindkey -M viins "$@"
  bindkey -M vicmd "$@"
}
compdef _bindkey vibindkey

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog


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

end of thread, other threads:[~2011-05-31 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31 16:32 Applying a bindkey command to multiple keymaps David Evans
2011-05-31 16:55 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).