branch: elpa/evil-matchit
commit 7ff2b954c0830fa2c69b0b1a74415587096faa2e
Author: Chen Bin <[email protected]>
Commit: Chen Bin <[email protected]>

    user can customize key binding, v0.0.6
---
 README.org          | 20 ++++++++++++++++++--
 evil-matchit-pkg.el |  2 +-
 evil-matchit.el     | 16 ++++++++++------
 pkg.sh              |  2 +-
 4 files changed, 30 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index e2046b276a..ba7043b1a9 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (current version 0.0.5)
+* evil-matchit (current version 0.0.6)
 
 Vim [[http://www.vim.org/scripts/script.php?script_id=39][matchit.vim]] by 
Benji Fisher ported into Emacs.
 
@@ -24,12 +24,28 @@ Press ",di" to delete item(s) wrapped by tags in 
evil-normal-mode whose command
 All commands support numeric argument like "3%", "5,si" or "9,di"
 
 * Advanced set up
+** Support more major modes
 html tags are automatically supported in nxml-mode, web-mode, html-mode and 
nxhtml-mode.
 
-Add below line into ~/.emacs to specify the major modes where to turn on html 
tag support:
+Add below line into ~/.emacs to support more major modes:
 #+BEGIN_SRC elisp
 (setq evilmi-html-major-modes '(nxml-mode web-mode html-mode nxhtml-mode 
php-mode jsp-mode))
 #+END_SRC
 
+** re-define keybinding
+You can define your own key bindings instead using evil-matchit default key 
binding.
+
+All you need to do is define function evilmi-customize-keybinding before 
turning on evil-mathcit-mode:
+#+BEGIN_SRC elisp
+(defun evilmi-customize-keybinding ()
+  (evil-define-key 'normal evil-matchit-mode-map
+    "%" 'evilmi-jump-items
+    ",si" 'evilmi-select-items
+    ",di" 'evilmi-delete-items
+    )
+  )
+(global-evil-matchit-mode 1)
+#+END_SRC
+
 * Contact me
 You can report bugs at [[https://github.com/redguardtoo/evil-matchit]].
diff --git a/evil-matchit-pkg.el b/evil-matchit-pkg.el
index 946296f8cc..8cae8126ce 100644
--- a/evil-matchit-pkg.el
+++ b/evil-matchit-pkg.el
@@ -1,2 +1,2 @@
-(define-package "evil-matchit" "0.0.5"
+(define-package "evil-matchit" "0.0.6"
                 "Vim matchit ported into Emacs (requires EVIL)")
diff --git a/evil-matchit.el b/evil-matchit.el
index ab2734fd39..51b98f56b1 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -4,7 +4,7 @@
 
 ;; Author: Chen Bin <[email protected]>
 ;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 0.0.5
+;; Version: 0.0.6
 ;; Keywords: matchit vim evil
 ;; Package-Requires: ((evil "1.0.7"))
 ;;
@@ -224,6 +224,14 @@
 (define-minor-mode evil-matchit-mode
   "Buffer-local minor mode to emulate matchit.vim"
   :keymap (make-sparse-keymap)
+  (if (fboundp 'evilmi-customize-keybinding)
+      (evilmi-customize-keybinding)
+    (evil-define-key 'normal evil-matchit-mode-map
+      "%" 'evilmi-jump-items
+      ",si" 'evilmi-select-items
+      ",di" 'evilmi-delete-items
+      )
+    )
   (evil-normalize-keymaps)
   )
 
@@ -242,11 +250,7 @@
   evil-matchit-mode turn-on-evil-matchit-mode
   "Global minor mode to emulate matchit.vim")
 
-(evil-define-key 'normal evil-matchit-mode-map
-  "%" 'evilmi-jump-items
-  ",si" 'evilmi-select-items
-  ",di" 'evilmi-delete-items
-  )
+
 
 (provide 'evil-matchit)
 
diff --git a/pkg.sh b/pkg.sh
index 1c0bea96dc..55342bce58 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-pkg=evil-matchit-0.0.5
+pkg=evil-matchit-0.0.6
 mkdir $pkg
 cp README.org $pkg
 cp *.el $pkg

Reply via email to