Merge pull request #186 from lloeki/eh-ctrl-c
Support Ctrl-C to cancel ex-mode
This commit is contained in:
commit
afaf152432
2 changed files with 5 additions and 1 deletions
|
|
@ -9,5 +9,7 @@
|
|||
# https://atom.io/docs/latest/advanced/keymaps
|
||||
'atom-text-editor.vim-mode-plus:not(.insert-mode)':
|
||||
':': 'ex-mode:open'
|
||||
'atom-text-editor.ex-mode-editor':
|
||||
'ctrl-c': 'ex-mode:close'
|
||||
'atom-text-editor.vim-mode:not(.insert-mode)':
|
||||
':': 'ex-mode:open'
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ class ExCommandModeInputElement extends HTMLDivElement
|
|||
@editorContainer.style.height = "0px"
|
||||
|
||||
@editorElement = document.createElement "atom-text-editor"
|
||||
@editorElement.classList.add('editor')
|
||||
@editorElement.classList.add('editor') # Consider this deprecated!
|
||||
@editorElement.classList.add('ex-mode-editor')
|
||||
@editorElement.getModel().setMini(true)
|
||||
@editorElement.setAttribute('mini', '')
|
||||
@editorContainer.appendChild(@editorElement)
|
||||
|
|
@ -40,6 +41,7 @@ class ExCommandModeInputElement extends HTMLDivElement
|
|||
|
||||
atom.commands.add(@editorElement, 'core:confirm', @confirm.bind(this))
|
||||
atom.commands.add(@editorElement, 'core:cancel', @cancel.bind(this))
|
||||
atom.commands.add(@editorElement, 'ex-mode:close', @cancel.bind(this))
|
||||
atom.commands.add(@editorElement, 'blur', @cancel.bind(this))
|
||||
|
||||
backspace: ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue