Make aliasing more prominent

This commit is contained in:
jazzpi 2016-02-18 18:12:33 +01:00
parent ded67a40b5
commit 145446b8de

View file

@ -16,8 +16,16 @@ 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'
You can also add aliases:
```coffee
atom.packages.onDidActivatePackage (pack) ->
if pack.name == 'ex-mode'
Ex = pack.mainModule.provideEx()
Ex.registerAlias 'WQ', 'wq'
Ex.registerAlias 'Wq', 'wq'
``` ```
See `lib/ex.coffee` for some examples commands. Contributions are very welcome! See `lib/ex.coffee` for some examples commands. Contributions are very welcome!