[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit f87f03bbf4 169/244: add generic rule to jump
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit f87f03bbf4 169/244: add generic rule to jump between brackets |
Date: |
Thu, 6 Jan 2022 02:58:58 -0500 (EST) |
branch: elpa/evil-matchit
commit f87f03bbf4cecf4a11dea17049b1428cab4fdd48
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
add generic rule to jump between brackets
---
README.org | 2 +-
evil-matchit-simple.el | 25 +++++++++++++++++++------
evil-matchit.el | 4 ++--
pkg.sh | 2 +-
4 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/README.org b/README.org
index 37785caa15..dbf1e965f7 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (v2.3.0)
+* evil-matchit (v2.3.1)
[[http://melpa.org/#/evil-matchit][file:http://melpa.org/packages/evil-matchit-badge.svg]]
[[http://stable.melpa.org/#/evil-matchit][file:http://stable.melpa.org/packages/evil-matchit-badge.svg]]
diff --git a/evil-matchit-simple.el b/evil-matchit-simple.el
index 7d1c319ba6..cbaf04e479 100644
--- a/evil-matchit-simple.el
+++ b/evil-matchit-simple.el
@@ -1,6 +1,6 @@
;;; evil-matchit-simple.el --- simple match plugin of evil-matchit
-;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2019 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -30,25 +30,37 @@
(require 'evil-matchit-sdk)
(defun evilmi--simple-find-open-brace (cur-line)
+ "Find open brace from CUR-LINE."
(if evilmi-debug (message "evilmi--simple-find-open-brace called =>
cur-line=%s (point)=%d" cur-line (point)))
(let (rlt)
- ;; javascript code line "(function(...) { ..."
- ;; C code line "} else {"
(cond
+
+ ;; code "(function(...) { ..."
+ ;; code "} else {"
;; css-mode use characters ".:-"
- ((or (string-match "^[ \t]*[\(\}]?[.:_a-zA-Z0-9-]+.*{ *\\(\/\/.*\\)?$"
cur-line)
- (string-match "^[ \t]*[\(\}]?[.:_a-zA-Z0-9-]+.*{
*\\(\/\*[^/]*\*\/\\)?$" cur-line))
+ ((or (string-match-p "^[ \t]*[\(\}]?[.:_a-zA-Z0-9-]+.*{ *\\(\/\/.*\\)?$"
cur-line)
+ (string-match-p "^[ \t]*[\(\}]?[.:_a-zA-Z0-9-]+.*{
*\\(\/\*[^/]*\*\/\\)?$" cur-line))
+ (setq rlt 1))
+
+ ;; code "} if (...) {"
+ ;; code "} else (...) {"
+ ((and (string-match-p "^[ \t]*[\}]? \\(if\\|el[a-z]*\\) *.*{ *?$"
cur-line)
+ (not (eq (following-char) ?})))
(setq rlt 1))
+
+ ;; next line is "{"
(t
(save-excursion
(forward-line)
(setq cur-line (evilmi-sdk-curline))
- (if (string-match "^[ \t]*{ *$" cur-line)
+ (if (string-match-p "^[ \t]*{ *$" cur-line)
(setq rlt 2)))))
+
rlt))
;;;###autoload
(defun evilmi-simple-get-tag ()
+ "Get current tag in simple language."
(let* (forward-line-num
;; Only handle open tag
(tmp (evilmi--get-char-under-cursor))
@@ -76,6 +88,7 @@
;;;###autoload
(defun evilmi-simple-jump (rlt NUM)
+ "Jump from current tag to matching tag in simple language."
(when rlt
(if evilmi-debug (message "evilmi-simple-jump called (point)=%d" (point)))
diff --git a/evil-matchit.el b/evil-matchit.el
index affd76be42..dd521e458d 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -4,7 +4,7 @@
;; Author: Chen Bin <chenbin.sh@gmail.com>
;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 2.3.0
+;; Version: 2.3.1
;; Keywords: matchit vim evil
;; Package-Requires: ((evil "1.2.0") (emacs "24.4"))
;;
@@ -454,7 +454,7 @@ If IS-FORWARD is t, jump forward; or else jump backward."
;;;###autoload
(defun evilmi-version()
(interactive)
- (message "2.3.0"))
+ (message "2.3.1"))
;;;###autoload
(define-minor-mode evil-matchit-mode
diff --git a/pkg.sh b/pkg.sh
index 0ad20f310f..768b29db33 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,6 +1,6 @@
#!/bin/bash
name=evil-matchit
-version=2.3.0
+version=2.3.1
pkg=$name-$version
mkdir $pkg
cp README.org $pkg
- [nongnu] elpa/evil-matchit 11352e24ff 083/244: support more pattern in lua-mode, (continued)
- [nongnu] elpa/evil-matchit 11352e24ff 083/244: support more pattern in lua-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e831d42aa5 085/244: relax regex for python matching, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 3c9d97f3d3 090/244: Merge pull request #60 from robbyoconnor/patch-1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 14e23187df 093/244: Put the melpa badges on the same line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 8b80b3df94 098/244: correct inner text-object in python-mode v2.1.2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 1a5c4454a7 111/244: support verilog, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit ceb13ad1b3 131/244: use more generic when processing C, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit df642d953d 139/244: add a few APIs, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 5ff747a1ef 125/244: When jumping find the first matching keyword in the current line, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 18cf34bc62 150/244: Update evil-matchit-verilog.el, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit f87f03bbf4 169/244: add generic rule to jump between brackets,
ELPA Syncer <=
- [nongnu] elpa/evil-matchit 00ab601346 161/244: support "define_method(method) do |*args|", ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 77c4a0a1d9 175/244: Ocaml: double semicolon matches let., ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2ea15db747 185/244: improve ruby matching algorithm (fixed item 1 of #114), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e44de538b9 196/244: clean code & doc, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 574d3c4e45 209/244: emacs 24.4 does not have font-lock-ensure, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2337748d26 214/244: autoload evilmi-prompt-line-p, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 43a626541d 025/244: support script language, v1.1.0, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 7ff2b954c0 015/244: user can customize key binding, v0.0.6, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 0dea7ddb67 009/244: better match single character tag, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit fbe22f1171 008/244: single file package does not need *-pkg.el, ELPA Syncer, 2022/01/06