Skip to content

Instantly share code, notes, and snippets.

@kevincolyar
Created January 27, 2011 08:59
Show Gist options
  • Save kevincolyar/798261 to your computer and use it in GitHub Desktop.
Save kevincolyar/798261 to your computer and use it in GitHub Desktop.
# ViKing can ignore entire applications
disable "Remote Desktop Connection"
# Basic mapping
map "<Ctrl-[>", "Escape"
map "<Ctrl-m>", "<Ctrl-F2>"
# Nice for debugging.
map "<Ctrl-v>", alert("Hello, World.")
# Lets disable those pesky arrows
# in a couple different ways.
map "Up", nil
map "Down", noop
%w(Left Right).each { |k| map k, nil }
# The following mappings are valid
# except for these application(s)
except /iTerm/, /MacVim/ do
map "<Ctrl-j>", "Down"
map "<Ctrl-k>", "Up"
map "<Ctrl-h>", "Left"
map "<Ctrl-l>", "Right"
map "<Ctrl-f>", "PageUp"
map "<Ctrl-b>", "PageDown"
end
# The following mappings are only
# for the given application(s)
only /Chrome/ do
map "<Ctrl-h>", "<Cmd-Shift-[>"
map "<Ctrl-l>", "<Cmd-Shift-]>"
# We can re-enable keys, too.
map "Down", "Down"
end
# Coming soon...
# --------------------------------------
# Type out entire cords
# map "<Ctrl-b>", "test"
# Right mouse click
# map "<Ctrl-r>", Mouse.right_click
# Application switching
# map "<Ctrl-9>", Applications.previous
# map "<Ctrl-0>", Applications.next
# Enable/disable ViKing
# map "<Ctrl-Shift-e>", ViKing.toggle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment