mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Ideas for keybinding syntax
This commit is contained in:
36
docs/keybindings.coffee
Normal file
36
docs/keybindings.coffee
Normal file
@@ -0,0 +1,36 @@
|
||||
# Keybinding ideas
|
||||
# ----------------
|
||||
# Are ctrl-v and ctrl-V different?
|
||||
# Nested commands? Use timeout?
|
||||
# Optional Regex, is that fucking crazy?
|
||||
# Command/Control/Option or cmd/ctrl/alt
|
||||
# How should we deal with scope?
|
||||
|
||||
keymap:
|
||||
# Take some method found in the keymap scope?
|
||||
'cmd-c': 'copyText'
|
||||
|
||||
# Take a block
|
||||
'cmd-v': -> paste.someText()
|
||||
|
||||
# Can take a regex
|
||||
# * how would this work with timeouts
|
||||
# * how can this not look so hackish
|
||||
# * do we even need this?
|
||||
'cmd-/(\d+)/': (number) ->
|
||||
window.switchTo(parseInt(number))
|
||||
|
||||
# Nested commands
|
||||
'cmd-ctrl-r':
|
||||
'r': -> run.something()
|
||||
't': -> test.something()
|
||||
|
||||
# Switch modes? I don't like this syntax
|
||||
'mode(normal):esc':
|
||||
'j': 'moveDown'
|
||||
'k': 'moveUp'
|
||||
'a': ->
|
||||
goto.endOfLine()
|
||||
keybindingMode('normal')
|
||||
'mode(insert):i':
|
||||
'delete': 'delete'
|
||||
Reference in New Issue
Block a user