[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit bed39041b1 123/244: support markdown
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit bed39041b1 123/244: support markdown |
Date: |
Thu, 6 Jan 2022 02:58:55 -0500 (EST) |
branch: elpa/evil-matchit
commit bed39041b1181ec26cf2601a8a7aa4afe2510f5b
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
support markdown
---
README.org | 3 +-
evil-matchit-c.el | 2 +-
evil-matchit-cmake.el | 4 +--
evil-matchit-diff.el | 2 +-
evil-matchit-fortran.el | 4 +--
evil-matchit-html.el | 2 +-
evil-matchit-javascript.el | 2 +-
evil-matchit-latex.el | 2 +-
evil-matchit-markdown.el | 79 ++++++++++++++++++++++++++++++++++++++++++++++
evil-matchit-org.el | 4 +--
evil-matchit-python.el | 2 +-
evil-matchit-ruby.el | 4 +--
evil-matchit-script.el | 4 +--
evil-matchit-sdk.el | 12 +++++--
evil-matchit-sh.el | 2 +-
evil-matchit-simple.el | 2 +-
evil-matchit-sql.el | 4 +--
evil-matchit-template.el | 4 +--
evil-matchit-verilog.el | 4 +--
evil-matchit.el | 14 +++++---
pkg.sh | 2 +-
21 files changed, 126 insertions(+), 32 deletions(-)
diff --git a/README.org b/README.org
index fe6395ad41..2f2b07a802 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,4 @@
-* evil-matchit (v2.2.2)
+* evil-matchit (v2.2.3)
[[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]]
@@ -15,6 +15,7 @@ Many modern languages are supported:
- React JSX (rjsx-mode)
- JSON
- OCaml
+- Markdown
- Perl
- Latex
- CMake
diff --git a/evil-matchit-c.el b/evil-matchit-c.el
index 6cec4c1083..442a60aa8f 100644
--- a/evil-matchit-c.el
+++ b/evil-matchit-c.el
@@ -1,6 +1,6 @@
;;; evil-matchit-c.el --c like language (c/c++/perl/java/javascript) plugin of
evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-cmake.el b/evil-matchit-cmake.el
index c3971e5294..6e15f62f1e 100644
--- a/evil-matchit-cmake.el
+++ b/evil-matchit-cmake.el
@@ -1,6 +1,6 @@
;;; evil-matchit-cmake.el ---cmake (ruby/lua) plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-diff.el b/evil-matchit-diff.el
index d0c978bce6..691d1b2aef 100644
--- a/evil-matchit-diff.el
+++ b/evil-matchit-diff.el
@@ -1,6 +1,6 @@
;;; evil-matchit-diff.el -- diff-mode plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-fortran.el b/evil-matchit-fortran.el
index 48c3341035..047a9fd4f7 100644
--- a/evil-matchit-fortran.el
+++ b/evil-matchit-fortran.el
@@ -1,6 +1,6 @@
;;; evil-matchit-fortran.el ---fortran (ruby/lua) plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-html.el b/evil-matchit-html.el
index a933d32936..3f7badc493 100644
--- a/evil-matchit-html.el
+++ b/evil-matchit-html.el
@@ -1,6 +1,6 @@
;;; evil-matchit-html.el ---html plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-javascript.el b/evil-matchit-javascript.el
index 0b3256adcf..eb86833421 100644
--- a/evil-matchit-javascript.el
+++ b/evil-matchit-javascript.el
@@ -1,6 +1,6 @@
;;; evil-matchit-javascript.el --- simple match plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-latex.el b/evil-matchit-latex.el
index a5e7c6af69..3fe6a0c1a5 100644
--- a/evil-matchit-latex.el
+++ b/evil-matchit-latex.el
@@ -1,6 +1,6 @@
;;; evil-matchit-latex.el ---latex plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-markdown.el b/evil-matchit-markdown.el
new file mode 100644
index 0000000000..d5921e787a
--- /dev/null
+++ b/evil-matchit-markdown.el
@@ -0,0 +1,79 @@
+;;; evil-matchit-markdown.el --- markdown-mode plugin of evil-matchit
+
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
+
+;; Author: Chen Bin <chenbin.sh@gmail.com>
+
+;; This file is not part of GNU Emacs.
+
+;;; License:
+
+;; This file is part of evil-matchit
+;;
+;; evil-matchit is free software: you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as published
+;; by the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; evil-matchit is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+;;; Code:
+
+;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
+;; but SDK don make you write less code, isn't it?
+;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
+(require 'evil-matchit-sdk)
+
+;;;###autoload
+(defun evilmi-markdown-get-tag ()
+ "Get current tag.
+Return (list start-position tag)."
+ (let* ((cur-line (evilmi-sdk-curline))
+ rlt
+ forward-direction)
+ (if (string-match "^\\(```\\)" cur-line)
+ (let* ((str (match-string 1 cur-line))
+ (prefix (buffer-substring-no-properties (point-min)
+
(line-beginning-position)))
+ (forward-direction (evenp (evilmi-count-matches str prefix))))
+ (setq rlt (list (if forward-direction (line-beginning-position)
+ (line-end-position))
+ forward-direction
+ str))))
+ rlt))
+
+;;;###autoload
+(defun evilmi-markdown-jump (info num)
+ "Jump to the next tag."
+ (let* ((forward-direction (nth 1 info))
+ (str (nth 2 info))
+ (pos (point))
+ (rlt pos))
+ (cond
+ ((string= str "```")
+ (let* ((prefix (buffer-substring-no-properties (point-min)
+
(line-beginning-position))))
+ (cond
+ (forward-direction
+ ;; jump forward
+ (goto-char (+ pos (length str)))
+ (search-forward str)
+ (setq rlt (line-end-position)))
+ (t
+ ;; jump backward
+ (goto-char (- pos (length str)))
+ (search-backward str)
+ (setq rlt (line-beginning-position))))))
+ (t
+ ;; do nothing
+ ))
+ rlt))
+
+(provide 'evil-matchit-markdown)
diff --git a/evil-matchit-org.el b/evil-matchit-org.el
index beb8f54616..5030a32a99 100644
--- a/evil-matchit-org.el
+++ b/evil-matchit-org.el
@@ -1,6 +1,6 @@
;;; evil-matchit-org.el --- org-mode plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-python.el b/evil-matchit-python.el
index 0bad0e570f..9603141d5a 100644
--- a/evil-matchit-python.el
+++ b/evil-matchit-python.el
@@ -1,6 +1,6 @@
;;; evil-matchit-python.el ---python plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-ruby.el b/evil-matchit-ruby.el
index 26730535ef..5e79b81692 100644
--- a/evil-matchit-ruby.el
+++ b/evil-matchit-ruby.el
@@ -1,6 +1,6 @@
;;; evil-matchit-ruby.el ---ruby plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-script.el b/evil-matchit-script.el
index a2b64951cf..0ea760b5e8 100644
--- a/evil-matchit-script.el
+++ b/evil-matchit-script.el
@@ -1,6 +1,6 @@
;;; evil-matchit-script.el ---script (ruby/lua) plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-sdk.el b/evil-matchit-sdk.el
index 464b743b76..2655f96c90 100644
--- a/evil-matchit-sdk.el
+++ b/evil-matchit-sdk.el
@@ -1,7 +1,6 @@
(defvar evilmi-sdk-extract-keyword-howtos
'(("^[ \t]*\\([a-z]+\!?\\)\\( .*\\| *\\)$" 1)
- ("^.* \\(do\\) |[a-z0-9A-Z,|]+|$" 1)
- )
+ ("^.* \\(do\\) |[a-z0-9A-Z,|]+|$" 1))
"The list of HOWTO on extracting keyword from current line.
Each howto is actually a pair. The first element of pair is the regular
expression to match the current line. The second is the index of sub-matches
@@ -268,4 +267,13 @@ is-function-exit-point could be unknown status"
))
where-to-jump-in-theory))
+(defun evilmi-count-matches (regexp str)
+ (let* ((count 0)
+ (start 0))
+ (unless start (setq start 0))
+ (while (string-match regexp str start)
+ (setq count (1+ count))
+ (setq start (match-end 0)))
+ count))
+
(provide 'evil-matchit-sdk)
diff --git a/evil-matchit-sh.el b/evil-matchit-sh.el
index 5e35998182..f85b0c127a 100644
--- a/evil-matchit-sh.el
+++ b/evil-matchit-sh.el
@@ -1,6 +1,6 @@
;;; evil-matchit-sh.el ---sh (bash/zsh) plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-simple.el b/evil-matchit-simple.el
index 7c924c93eb..0d23f3af36 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-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
diff --git a/evil-matchit-sql.el b/evil-matchit-sql.el
index d1dcc52700..5ba424bf09 100644
--- a/evil-matchit-sql.el
+++ b/evil-matchit-sql.el
@@ -1,6 +1,6 @@
;;; evil-matchit-sql.el ---sql plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-template.el b/evil-matchit-template.el
index 214f9ba7f6..d07b7c698a 100644
--- a/evil-matchit-template.el
+++ b/evil-matchit-template.el
@@ -1,6 +1,6 @@
;;; evil-matchit-template.el --- web template plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit-verilog.el b/evil-matchit-verilog.el
index 11d97fafa8..f06c8d8e88 100644
--- a/evil-matchit-verilog.el
+++ b/evil-matchit-verilog.el
@@ -1,6 +1,6 @@
;;; evil-matchit-verilog.el ---verilog plugin of evil-matchit
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
@@ -27,7 +27,7 @@
;;; Code:
;; OPTIONAL, you don't need SDK to write a plugin for evil-matchit
-;; but SDK don make you write less code, isn't it?
+;; but SDK do make you write less code, isn't it?
;; All you need to do is just define the match-tags for SDK algorithm to
lookup.
(require 'evil-matchit-sdk)
diff --git a/evil-matchit.el b/evil-matchit.el
index 1a26e7b92f..7ac63afca1 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -1,10 +1,10 @@
;;; evil-matchit.el --- Vim matchit ported to Evil
-;; Copyright (C) 2014-2016 Chen Bin <chenbin.sh@gmail.com>
+;; Copyright (C) 2014-2017 Chen Bin <chenbin.sh@gmail.com>
;; Author: Chen Bin <chenbin.sh@gmail.com>
;; URL: http://github.com/redguardtoo/evil-matchit
-;; Version: 2.2.2
+;; Version: 2.2.3
;; Keywords: matchit vim evil
;; Package-Requires: ((evil "1.0.7"))
;;
@@ -307,9 +307,15 @@ If IS-FORWARD is t, jump forward; or else jump backward."
;; Emacs Org-mode
(autoload 'evilmi-org-get-tag "evil-matchit-org" nil)
- (autoload 'evilmi-org-jump "evil-matchit-org" nil t)
+ (autoload 'evilmi-org-jump "evil-matchit-org" nil)
(plist-put evilmi-plugins 'org-mode '((evilmi-org-get-tag evilmi-org-jump)))
+
+ ;; Markdown
+ (autoload 'evilmi-markdown-get-tag "evil-matchit-markdown" nil)
+ (autoload 'evilmi-markdown-jump "evil-matchit-markdown" nil)
+ (plist-put evilmi-plugins 'markdown-mode '((evilmi-markdown-get-tag
evilmi-markdown-jump)))
+
;; Latex
(autoload 'evilmi-latex-get-tag "evil-matchit-latex" nil)
(autoload 'evilmi-latex-jump "evil-matchit-latex" nil t)
@@ -486,7 +492,7 @@ If IS-FORWARD is t, jump forward; or else jump backward."
;;;###autoload
(defun evilmi-version()
(interactive)
- (message "2.2.2"))
+ (message "2.2.3"))
;;;###autoload
(define-minor-mode evil-matchit-mode
diff --git a/pkg.sh b/pkg.sh
index 7120125b4a..60f17e0b96 100755
--- a/pkg.sh
+++ b/pkg.sh
@@ -1,6 +1,6 @@
#!/bin/bash
name=evil-matchit
-version=2.2.2
+version=2.2.3
pkg=$name-$version
mkdir $pkg
cp README.org $pkg
- [nongnu] elpa/evil-matchit ff29cd2264 084/244: workaround issue in python-mode v2.0.2, (continued)
- [nongnu] elpa/evil-matchit ff29cd2264 084/244: workaround issue in python-mode v2.0.2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 63846fc4c0 089/244: Add melpa badge, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 62d948743e 092/244: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 98c045d352 094/244: Merge pull request #61 from robbyoconnor/patch-2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 94e359e30c 095/244: Fix embedded major-mode detection in org-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit c675e740a7 101/244: can simple jump in latex-mode, #70, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 34c51f68fd 102/244: jump in diff-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 64791bc376 105/244: clean code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 51d46747e3 108/244: support Facebook React JSX, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 8a56092b38 110/244: can handle `render()` in jsx, code cleaned, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit bed39041b1 123/244: support markdown,
ELPA Syncer <=
- [nongnu] elpa/evil-matchit 7d65b4167b 156/244: clean plugins setup code, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit b63f840ee7 124/244: When on whitespace following a keyword don't jump backwards, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 20270ab6b0 135/244: support one liner, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 51d8b268e5 138/244: Merge pull request #86 from yqrashawn/support-tsx, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit dbaae2b753 127/244: Merge pull request #81 from neojski/ocaml, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit dea3fca13b 168/244: clean code dependency, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 64b572d2e4 166/244: Merge pull request #107 from porras/patch-2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2a53963ffc 182/244: support php-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 076ace3ee2 188/244: README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit ec0ea006e9 184/244: improve html tag matching algorithm, ELPA Syncer, 2022/01/06