arpeggio : Key mappings for simultaneously pressed keys



script karma Rating 121/38, Downloaded by 3220 Comments, bugs, improvements Vim wiki created by Kana Natsuno script type utility description *arpeggio* is a Vim plugin to define another type of |key-mapping| called

*arpeggio-key-mapping* -- it consists of 2 or more keys ({lhs}) and it will be

expanded to another key sequence ({rhs}) whenever all keys in {lhs} are

simultaneously pressed. For example:



Arpeggio inoremap jk <Esc>

" OR

call arpeggio#map('i', '', 0, 'jk', '<Esc>')



With the above definition, you can input <Esc> in Insert mode by pressing "j"

and "k" simultaneously, while you can move the cursor by pressing "j" or "k"

solely.



The concept of this plugin is derived from Emacs' key-chord.el (*1), but there

are the following differences:



- Number of keys to be simultaneously pressed is unlimited.



- Custom delay for each key is supported (see |g:arpeggio_timeoutlens|).

This is a generalization of space-chord.el (*2).



(*1) http://www.emacswiki.org/emacs/key-chord.el

(*2) http://www.emacswiki.org/emacs/space-chord.el





Requirements:

- Vim 7.2 or later



Latest version:

http://github.com/kana/vim-arpeggio



Document in HTML format:

http://kana.github.com/config/vim/arpeggio.html install details ... rate this script Life Changing Helpful Unfulfilling script versions (upload new version) Click on the package to download. package script version date Vim version user release notes vim-arpeggio-0.0.6.zip 0.0.6 2010-04-20 7.0 Kana Natsuno - Fix |arpeggio-commands| to behave the same as |:map| commands. In other words, " and keys after " in {rhs} for |arpeggio-commands| are treated as a part of {rhs}. Old versions don't behave so.

- Fix minor bugs.

- Revise the document a bit.

- Revise additional syntax highlighting a bit. vim-arpeggio-0.0.5.zip 0.0.5 2008-12-06 7.0 Kana Natsuno - Remove the assumption on 'timeout' and 'ttimeout'. Old version

assumes that "set timeout notimeout", but now their values can be

arbitrary.

- Fix the bug that 'ttimeoutlen' can be interpreted as an unexpected

value because of the adjustment of 'timeout' and 'timeoutlen' for

arpeggio key mappings. vim-arpeggio-0.0.4.zip 0.0.4 2008-11-11 7.0 Kana Natsuno - Add syntax highlighting for |arpeggio-commands|.

- Fix bugs of "noremap" version of |arpeggio-commands| such as

|:Arpeggionoremap| that {rhs} are remapped despite the meaning of

the commands. (Thanks for id:ampmmn) vim-arpeggio-0.0.3.zip 0.0.3 2008-11-09 7.0 Kana Natsuno - Add |:Arpeggio|.

- Support |:map-<unique>| for |arpeggio#map()| and other commands.

- In |arpeggio#map()| and other commands, warn if a key in {lhs} is

already mapped to something other than a part of another

|arpeggio-key-mapping|.

- Add custom 'timeoutlen' per key. See |g:arpeggio_timeoutlens|.

- Add a bit of completion for |arpeggio-commands|. vim-arpeggio-0.0.2.zip 0.0.2 2008-11-07 7.0 Kana Natsuno - Fix |:Arpeggionoremap| that allowed remapping but it should not do

so. (Thanks for id:ampmmn)

- Define |arpeggio-commands| and |arpeggio-variables| automatically

for interactive or other use. (But you still have to call

|arpeggio#load()| to use them in vimrc.) vim-arpeggio-0.0.1.zip 0.0.1 2008-11-06 7.0 Kana Natsuno - Implement |arpeggio-commands|.

- Add missing |arpeggio#list()|.

- Revise minor stuffs. vim-arpeggio-0.0.0.zip 0.0.0 2008-11-05 7.0 Kana Natsuno Initial upload ip used for rating: 176.9.113.70