Adding meta-index key commands to editor to access a buffer directly

This commit is contained in:
Jon Rohan
2012-12-28 20:30:20 -08:00
parent 85423d0034
commit 0d76ff2ac9
2 changed files with 18 additions and 0 deletions

View File

@@ -164,6 +164,15 @@ class Editor extends View
'editor:split-up': @splitUp
'editor:split-down': @splitDown
'editor:show-next-buffer': @loadNextEditSession
'editor:show-buffer-1': => @setActiveEditSessionIndex(0) if @editSessions[0]
'editor:show-buffer-2': => @setActiveEditSessionIndex(1) if @editSessions[1]
'editor:show-buffer-3': => @setActiveEditSessionIndex(2) if @editSessions[2]
'editor:show-buffer-4': => @setActiveEditSessionIndex(3) if @editSessions[3]
'editor:show-buffer-5': => @setActiveEditSessionIndex(4) if @editSessions[4]
'editor:show-buffer-6': => @setActiveEditSessionIndex(5) if @editSessions[5]
'editor:show-buffer-7': => @setActiveEditSessionIndex(6) if @editSessions[6]
'editor:show-buffer-8': => @setActiveEditSessionIndex(7) if @editSessions[7]
'editor:show-buffer-9': => @setActiveEditSessionIndex(8) if @editSessions[8]
'editor:show-previous-buffer': @loadPreviousEditSession
'editor:toggle-line-comments': @toggleLineCommentsInSelection
'editor:log-cursor-scope': @logCursorScope

View File

@@ -19,6 +19,15 @@ window.keymap.bindKeys '.editor',
'meta-]': 'editor:indent-selected-rows'
'meta-{': 'editor:show-previous-buffer'
'meta-}': 'editor:show-next-buffer'
'meta-1': 'editor:show-buffer-1'
'meta-2': 'editor:show-buffer-2'
'meta-3': 'editor:show-buffer-3'
'meta-4': 'editor:show-buffer-4'
'meta-5': 'editor:show-buffer-5'
'meta-6': 'editor:show-buffer-6'
'meta-7': 'editor:show-buffer-7'
'meta-8': 'editor:show-buffer-8'
'meta-9': 'editor:show-buffer-9'
'meta-/': 'editor:toggle-line-comments'
'ctrl-W': 'editor:select-word'
'meta-alt-p': 'editor:log-cursor-scope'