Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Applying a bindkey command to multiple keymaps



On Tue, 31 May 2011 17:32:16 +0100
David Evans <David.Evans@xxxxxxxxxxxx> 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@xxxxxxx>            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



Messages sorted by: Reverse Date, Date, Thread, Author