1 GlobalExState = require './global-ex-state'
2 ExState = require './ex-state'
4 {Disposable, CompositeDisposable} = require 'event-kit'
6 module.exports = ExMode =
8 @globalExState = new GlobalExState
9 @disposables = new CompositeDisposable
10 @exStates = new WeakMap
12 @disposables.add atom.workspace.observeTextEditors (editor) =>
15 element = atom.views.getView(editor)
17 if not @exStates.get(editor)
18 exState = new ExState(
23 @exStates.set(editor, exState)
25 @disposables.add new Disposable =>
29 @disposables.dispose()
32 registerCommand: Ex.registerCommand.bind(Ex)
36 @globalExState.setVim(vim)