Make Ex.registerAlias accessible from the outside
This commit is contained in:
parent
155ffcaa5a
commit
701f27130f
2 changed files with 3 additions and 0 deletions
|
|
@ -18,6 +18,8 @@ atom.packages.onDidActivatePackage (pack) ->
|
||||||
if pack.name == 'ex-mode'
|
if pack.name == 'ex-mode'
|
||||||
Ex = pack.mainModule.provideEx()
|
Ex = pack.mainModule.provideEx()
|
||||||
Ex.registerCommand 'z', -> console.log("Zzzzzz...")
|
Ex.registerCommand 'z', -> console.log("Zzzzzz...")
|
||||||
|
# Register an alias - Now :W acts like :w
|
||||||
|
Ex.registerAlias 'W', 'w'
|
||||||
```
|
```
|
||||||
|
|
||||||
See `lib/ex.coffee` for some examples commands. Contributions are very welcome!
|
See `lib/ex.coffee` for some examples commands. Contributions are very welcome!
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ module.exports = ExMode =
|
||||||
|
|
||||||
provideEx: ->
|
provideEx: ->
|
||||||
registerCommand: Ex.registerCommand.bind(Ex)
|
registerCommand: Ex.registerCommand.bind(Ex)
|
||||||
|
registerAlias: Ex.registerAlias.bind(Ex)
|
||||||
|
|
||||||
consumeVim: (vim) ->
|
consumeVim: (vim) ->
|
||||||
@vim = vim
|
@vim = vim
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue