branch: elpa/evil-matchit
commit 3873a93653e683f79752c3810484cf19c56f2555
Author: Chen Bin <[email protected]>
Commit: Chen Bin <[email protected]>
support enh-ruby-mode, more tips v2.0.1
---
README.org | 22 +++++++++++++++-------
evil-matchit-pkg.el | 2 +-
evil-matchit.el | 4 ++--
pkg.sh | 2 +-
screencast.gif | Bin 318349 -> 318351 bytes
5 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 1caa437aa0..67f96d6709 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (v2.0)
+* evil-matchit (v2.0.1)
Vim [[http://www.vim.org/scripts/script.php?script_id=39][matchit.vim]] by
Benji Fisher ported into Emacs.
@@ -31,10 +31,10 @@ Tested on Emacs 23.4, 24.3, 24.4
* Why use evil-matchit
- No learning curve. Press "%" to jump. That's all!
-- Stable! The ONLY dependency is evil-mode. It works in any major modes
(web-mode, html-mode ...).
-- Support any modern languages (html/java/c/c++/python/latex/javascript ...).
+- Stable! Though it's dependent on evil-mode, NO evil-mode API is used
+- Support any modern languages (html/java/c/c++/python/latex/javascript ...)
- Powerful. If you mix jsp, freemarker, html, jquery template or any weird
syntax into one file, it still works!
-- Extendable. Write a plugin for it takes only 5 minutes.
+- Extendable. Write a plugin for it takes only 5 minutes
- Long term support
Screen cast for python:
@@ -68,6 +68,10 @@ All commands support numeric argument like "3%", "5va%" or
"9da%"
Please note "3%" will jump to a line *3 percentage down the file*. It's the
default behavior in original evil-mode . You can `(setq
evilmi-may-jump-by-percentage nil)` to turn off this feature. Then "3%" will
*jump 3 times*.
* Advanced tips
+** Use evilmi-select-items instead press '%' in evil-visual-state
+evilmi-select-items is more robust and provides more functionality. It works
even when evil-mode is not loaded.
+
+So you'd better stick to evilmi-select-items if possible.
** Add new tags into existing languages
I use ruby as an example.
@@ -97,14 +101,18 @@ Let's use html tag matching as an example.
html tags are automatically supported in sgml-mode, nxml-mode, web-mode,
html-mode and nxhtml-mode,.
-You want a new major-mode "my-mode" to do the html tag matching? Easy. Please
add below line into your ~/.emacs:
+You want a new major-mode "my-mode" to do the html tag matching? Easy. Please
add below code into your ~/.emacs:
#+BEGIN_SRC elisp
-(plist-put evilmi-plugins my-mode '((evilmi-html-get-tag evilmi-html-jump)))
+(plist-put evilmi-plugins my-mode '((evilmi-simple-get-tag evilmi-simple-jump)
+ (evilmi-html-get-tag evilmi-html-jump)))
#+END_SRC
-Further explanation: "evilmi-html-get-tag" and "evilmi-html-jump" are existing
APIs which are defined in evil-matchit-html.el. The above line means that in
my-mode, use "evilmi-html-get-tag" to find open/closed tag in current line and
use "evilmi-html-jump" to jump to matched closed/open tag.
+Further explanation: "evilmi-html-get-tag" and "evilmi-html-jump" are existing
APIs which are defined in evil-matchit-html.el.
+
+The above line means that use "evilmi-html-get-tag" to find open/closed tag in
current line and use "evilmi-html-jump" to jump to matched closed/open tag.
+"evilmi-simple-get-tag" and "evilmi-simple-jump" provide generic rules shared
by most major modes. For example, jumping between two end of the string,
between brackets, etc.
** Mixed languages in one html template file is supported
If you embed python language in a html file. You can match both html tags and
python statement by inserting below code into your ~/.emacs:
#+BEGIN_SRC elisp
diff --git a/evil-matchit-pkg.el b/evil-matchit-pkg.el
index 38024bc899..46d9970267 100644
--- a/evil-matchit-pkg.el
+++ b/evil-matchit-pkg.el
@@ -1,2 +1,2 @@
-(define-package "evil-matchit" "2.0"
+(define-package "evil-matchit" "2.0.1"
"Vim matchit ported into Emacs (requires EVIL)")
diff --git a/evil-matchit.el b/evil-matchit.el
index 0e25f1d545..58075e2239 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: 2.0
+;; Version: 2.0.1
;; Keywords: matchit vim evil
;; Package-Requires: ((evil "1.0.7"))
;;
@@ -438,7 +438,7 @@ If font-face-under-cursor is NOT nil, the quoted string is
being processed"
))
;;;###autoload
-(defun evilmi-version() (interactive) (message "2.0"))
+(defun evilmi-version() (interactive) (message "2.0.1"))
;;;###autoload
(define-minor-mode evil-matchit-mode
diff --git a/pkg.sh b/pkg.sh
index 524e0a8f55..996632db83 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-pkg=evil-matchit-2.0
+pkg=evil-matchit-2.0.1
mkdir $pkg
cp README.org $pkg
cp *.el $pkg
diff --git a/screencast.gif b/screencast.gif
index 948a6a97f1..48bb05fa54 100644
Binary files a/screencast.gif and b/screencast.gif differ