Make aliasing more prominent
This commit is contained in:
parent
ded67a40b5
commit
145446b8de
1 changed files with 10 additions and 2 deletions
12
README.md
12
README.md
|
|
@ -16,8 +16,16 @@ atom.packages.onDidActivatePackage (pack) ->
|
|||
if pack.name == 'ex-mode'
|
||||
Ex = pack.mainModule.provideEx()
|
||||
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!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue