mirror of
https://github.com/atom/atom.git
synced 2026-02-08 13:45:09 -05:00
Give editor-specific events the "editor:" prefix
This commit is contained in:
@@ -113,46 +113,46 @@ class Editor extends View
|
||||
'core:cut': @cutSelection
|
||||
'core:copy': @copySelection
|
||||
'core:paste': @paste
|
||||
'move-to-next-word': @moveCursorToNextWord
|
||||
'move-to-previous-word': @moveCursorToPreviousWord
|
||||
'select-word': @selectWord
|
||||
'newline': @insertNewline
|
||||
'indent': @indent
|
||||
'indent-selected-rows': @indentSelectedRows
|
||||
'outdent-selected-rows': @outdentSelectedRows
|
||||
'backspace-to-beginning-of-word': @backspaceToBeginningOfWord
|
||||
'delete-to-end-of-word': @deleteToEndOfWord
|
||||
'delete-line': @deleteLine
|
||||
'cut-to-end-of-line': @cutToEndOfLine
|
||||
'move-to-beginning-of-line': @moveCursorToBeginningOfLine
|
||||
'move-to-end-of-line': @moveCursorToEndOfLine
|
||||
'move-to-first-character-of-line': @moveCursorToFirstCharacterOfLine
|
||||
'move-to-beginning-of-word': @moveCursorToBeginningOfWord
|
||||
'move-to-end-of-word': @moveCursorToEndOfWord
|
||||
'select-to-end-of-line': @selectToEndOfLine
|
||||
'select-to-beginning-of-line': @selectToBeginningOfLine
|
||||
'select-to-end-of-word': @selectToEndOfWord
|
||||
'select-to-beginning-of-word': @selectToBeginningOfWord
|
||||
'editor:move-to-next-word': @moveCursorToNextWord
|
||||
'editor:move-to-previous-word': @moveCursorToPreviousWord
|
||||
'editor:select-word': @selectWord
|
||||
'editor:newline': @insertNewline
|
||||
'editor:indent': @indent
|
||||
'editor:indent-selected-rows': @indentSelectedRows
|
||||
'editor:outdent-selected-rows': @outdentSelectedRows
|
||||
'editor:backspace-to-beginning-of-word': @backspaceToBeginningOfWord
|
||||
'editor:delete-to-end-of-word': @deleteToEndOfWord
|
||||
'editor:delete-line': @deleteLine
|
||||
'editor:cut-to-end-of-line': @cutToEndOfLine
|
||||
'editor:move-to-beginning-of-line': @moveCursorToBeginningOfLine
|
||||
'editor:move-to-end-of-line': @moveCursorToEndOfLine
|
||||
'editor:move-to-first-character-of-line': @moveCursorToFirstCharacterOfLine
|
||||
'editor:move-to-beginning-of-word': @moveCursorToBeginningOfWord
|
||||
'editor:move-to-end-of-word': @moveCursorToEndOfWord
|
||||
'editor:select-to-end-of-line': @selectToEndOfLine
|
||||
'editor:select-to-beginning-of-line': @selectToBeginningOfLine
|
||||
'editor:select-to-end-of-word': @selectToEndOfWord
|
||||
'editor:select-to-beginning-of-word': @selectToBeginningOfWord
|
||||
|
||||
unless @mini
|
||||
_.extend editorBindings,
|
||||
'save': @save
|
||||
'newline-below': @insertNewlineBelow
|
||||
'toggle-soft-wrap': @toggleSoftWrap
|
||||
'fold-all': @foldAll
|
||||
'unfold-all': @unfoldAll
|
||||
'fold-current-row': @foldCurrentRow
|
||||
'unfold-current-row': @unfoldCurrentRow
|
||||
'fold-selection': @foldSelection
|
||||
'split-left': @splitLeft
|
||||
'split-right': @splitRight
|
||||
'split-up': @splitUp
|
||||
'split-down': @splitDown
|
||||
'close': @close
|
||||
'show-next-buffer': @loadNextEditSession
|
||||
'show-previous-buffer': @loadPreviousEditSession
|
||||
'toggle-line-comments': @toggleLineCommentsInSelection
|
||||
'log-cursor-scope': @logCursorScope
|
||||
'core:close': @close
|
||||
'editor:save': @save
|
||||
'editor:newline-below': @insertNewlineBelow
|
||||
'editor:toggle-soft-wrap': @toggleSoftWrap
|
||||
'editor:fold-all': @foldAll
|
||||
'editor:unfold-all': @unfoldAll
|
||||
'editor:fold-current-row': @foldCurrentRow
|
||||
'editor:unfold-current-row': @unfoldCurrentRow
|
||||
'editor:fold-selection': @foldSelection
|
||||
'editor:split-left': @splitLeft
|
||||
'editor:split-right': @splitRight
|
||||
'editor:split-up': @splitUp
|
||||
'editor:split-down': @splitDown
|
||||
'editor:show-next-buffer': @loadNextEditSession
|
||||
'editor:show-previous-buffer': @loadPreviousEditSession
|
||||
'editor:toggle-line-comments': @toggleLineCommentsInSelection
|
||||
'editor:log-cursor-scope': @logCursorScope
|
||||
|
||||
for name, method of editorBindings
|
||||
do (name, method) =>
|
||||
|
||||
@@ -5,13 +5,13 @@ window.keymap.bindKeys 'body'
|
||||
'meta-shift-down': 'core:select-to-bottom'
|
||||
|
||||
window.keymap.bindKeys '.editor'
|
||||
'meta-right': 'move-to-end-of-line'
|
||||
'meta-left': 'move-to-beginning-of-line'
|
||||
'alt-left': 'move-to-beginning-of-word'
|
||||
'alt-right': 'move-to-end-of-word'
|
||||
'meta-shift-left': 'select-to-beginning-of-line'
|
||||
'meta-shift-right': 'select-to-end-of-line'
|
||||
'alt-shift-left': 'select-to-beginning-of-word'
|
||||
'alt-shift-right': 'select-to-end-of-word'
|
||||
'alt-backspace': 'backspace-to-beginning-of-word'
|
||||
'alt-delete': 'delete-to-end-of-word'
|
||||
'meta-right': 'editor:move-to-end-of-line'
|
||||
'meta-left': 'editor:move-to-beginning-of-line'
|
||||
'alt-left': 'editor:move-to-beginning-of-word'
|
||||
'alt-right': 'editor:move-to-end-of-word'
|
||||
'meta-shift-left': 'editor:select-to-beginning-of-line'
|
||||
'meta-shift-right': 'editor:select-to-end-of-line'
|
||||
'alt-shift-left': 'editor:select-to-beginning-of-word'
|
||||
'alt-shift-right': 'editor:select-to-end-of-word'
|
||||
'alt-backspace': 'editor:backspace-to-beginning-of-word'
|
||||
'alt-delete': 'editor:delete-to-end-of-word'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
window.keymap.bindKeys 'body'
|
||||
'meta-w': 'close'
|
||||
'alt-meta-i': 'toggle-dev-tools'
|
||||
'meta-w': 'core:close'
|
||||
up: 'core:move-up'
|
||||
down: 'core:move-down'
|
||||
left: 'core:move-left'
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
window.keymap.bindKeys '.editor',
|
||||
'meta-s': 'save'
|
||||
'enter': 'newline'
|
||||
'meta-enter': 'newline-below'
|
||||
'tab': 'indent'
|
||||
'meta-d': 'delete-line'
|
||||
'alt-meta-w': 'toggle-soft-wrap'
|
||||
'ctrl-[': 'fold-current-row'
|
||||
'ctrl-]': 'unfold-current-row'
|
||||
'ctrl-{': 'fold-all'
|
||||
'ctrl-}': 'unfold-all'
|
||||
'alt-meta-ctrl-f': 'fold-selection'
|
||||
'alt-meta-left': 'split-left'
|
||||
'alt-meta-right': 'split-right'
|
||||
'alt-meta-up': 'split-up'
|
||||
'alt-meta-down': 'split-down'
|
||||
'shift-tab': 'outdent-selected-rows'
|
||||
'meta-[': 'outdent-selected-rows'
|
||||
'meta-]': 'indent-selected-rows'
|
||||
'meta-{': 'show-previous-buffer'
|
||||
'meta-}': 'show-next-buffer'
|
||||
'meta-+': 'increase-font-size'
|
||||
'meta--': 'decrease-font-size'
|
||||
'meta-/': 'toggle-line-comments'
|
||||
'ctrl-w w': 'focus-next-pane'
|
||||
'ctrl-W': 'select-word'
|
||||
'meta-alt-p': 'log-cursor-scope'
|
||||
'meta-s': 'editor:save'
|
||||
'enter': 'editor:newline'
|
||||
'meta-enter': 'editor:newline-below'
|
||||
'tab': 'editor:indent'
|
||||
'meta-d': 'editor:delete-line'
|
||||
'alt-meta-w': 'editor:toggle-soft-wrap'
|
||||
'ctrl-[': 'editor:fold-current-row'
|
||||
'ctrl-]': 'editor:unfold-current-row'
|
||||
'ctrl-{': 'editor:fold-all'
|
||||
'ctrl-}': 'editor:unfold-all'
|
||||
'alt-meta-ctrl-f': 'editor:fold-selection'
|
||||
'alt-meta-left': 'editor:split-left'
|
||||
'alt-meta-right': 'editor:split-right'
|
||||
'alt-meta-up': 'editor:split-up'
|
||||
'alt-meta-down': 'editor:split-down'
|
||||
'shift-tab': 'editor:outdent-selected-rows'
|
||||
'meta-[': 'editor:outdent-selected-rows'
|
||||
'meta-]': 'editor:indent-selected-rows'
|
||||
'meta-{': 'editor:show-previous-buffer'
|
||||
'meta-}': 'editor:show-next-buffer'
|
||||
'meta-+': 'editor:increase-font-size'
|
||||
'meta--': 'editor:decrease-font-size'
|
||||
'meta-/': 'editor:toggle-line-comments'
|
||||
'ctrl-w w': 'editor:focus-next-pane'
|
||||
'ctrl-W': 'editor:select-word'
|
||||
'meta-alt-p': 'editor:log-cursor-scope'
|
||||
|
||||
@@ -11,12 +11,12 @@ window.keymap.bindKeys 'body',
|
||||
'ctrl-d': 'core:delete'
|
||||
|
||||
window.keymap.bindKeys '.editor',
|
||||
'alt-f': 'move-to-end-of-word'
|
||||
'alt-F': 'select-to-end-of-word'
|
||||
'alt-b': 'move-to-beginning-of-word'
|
||||
'alt-B': 'select-to-beginning-of-word'
|
||||
'ctrl-a': 'move-to-first-character-of-line'
|
||||
'ctrl-e': 'move-to-end-of-line'
|
||||
'alt-h': 'backspace-to-beginning-of-word'
|
||||
'alt-d': 'delete-to-end-of-word'
|
||||
'ctrl-k': 'cut-to-end-of-line'
|
||||
'alt-f': 'editor:move-to-end-of-word'
|
||||
'alt-F': 'editor:select-to-end-of-word'
|
||||
'alt-b': 'editor:move-to-beginning-of-word'
|
||||
'alt-B': 'editor:select-to-beginning-of-word'
|
||||
'ctrl-a': 'editor:move-to-first-character-of-line'
|
||||
'ctrl-e': 'editor:move-to-end-of-line'
|
||||
'alt-h': 'editor:backspace-to-beginning-of-word'
|
||||
'alt-d': 'editor:delete-to-end-of-word'
|
||||
'ctrl-k': 'editor:cut-to-end-of-line'
|
||||
|
||||
Reference in New Issue
Block a user