From 701f27130fa5fa92c5e664d6f06919dcf67ad46b Mon Sep 17 00:00:00 2001 From: jazzpi Date: Mon, 28 Dec 2015 12:45:19 +0100 Subject: [PATCH] Make Ex.registerAlias accessible from the outside --- README.md | 2 ++ lib/ex-mode.coffee | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index abf3f64..bb7b6e0 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ 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' ``` See `lib/ex.coffee` for some examples commands. Contributions are very welcome! diff --git a/lib/ex-mode.coffee b/lib/ex-mode.coffee index 1a4979d..e3a15b2 100644 --- a/lib/ex-mode.coffee +++ b/lib/ex-mode.coffee @@ -30,6 +30,7 @@ module.exports = ExMode = provideEx: -> registerCommand: Ex.registerCommand.bind(Ex) + registerAlias: Ex.registerAlias.bind(Ex) consumeVim: (vim) -> @vim = vim