module Plugins::KeyMapping

Public Instance Methods

get_environment_hash()
imap(source, *args, &block)

This method maps keys in insert mode, given the current application supports accesibility.

map(source, *args, &block)

This is the basic method to map keys.

Map string to another string

map 'a', 'b'
map 'a', 'Hello, world.'
map '<Cmd-a>', '<Cmd-b>'
map '<Ctrl-a>', '<Cmd-b>'
map '<Alt-a>', '<Cmd-b>'
map '<Option-a>', '<Cmd-b>'

Map a string to block

map 'a' do 
  alert("Hello, world.")
end

map 'a' { alert('Hello, world }
nmap(source, *args, &block)

This method maps keys in normal mode, given the current application supports accesibility.

parse_args(args)
unimap(source)

This method unmaps an insert mode key mapping from the repository.

Example

unimap('<Cmd-a>')
unmap(source, mode='any')

This method unmaps a key mapping from the repository. This unmaps key mappings for both insert and normal modes.

Example

unmap('<Cmd-a>')
unnmap(source)

This method unmaps an normal mode key mapping from the repository.

Example

unnmap('<Cmd-a>')