[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit d92883b8c3 007/244: use evil API in html file
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit d92883b8c3 007/244: use evil API in html file some times |
Date: |
Thu, 6 Jan 2022 02:58:43 -0500 (EST) |
branch: elpa/evil-matchit
commit d92883b8c3568a63d8db75fdc5a55a8c1c2a104c
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
use evil API in html file some times
---
evil-matchit.el | 39 +++++++++++++++++++++++++++++----------
1 file changed, 29 insertions(+), 10 deletions(-)
diff --git a/evil-matchit.el b/evil-matchit.el
index dc0544a9be..6f49aff6b1 100644
--- a/evil-matchit.el
+++ b/evil-matchit.el
@@ -47,9 +47,24 @@
)
"major modes containing html tags")
+;; {}()''""
+;; @return (list found_tag is_end_tag)
+(defun evilmi--at-single-char-tag ()
+ (let ((char (following-char))
+ (found_tag nil)
+ (is_end_tag nil))
+ ;; '{'
+ (if (= char 123) (setq found_tag t) (setq is_end_tag nil))
+ (if (= char 125) (setq found_tag t) (setq is_end_tag t))
+ ;; '('
+ (if (= char 40) (setq found_tag t) (setq is_end_tag nil))
+ (if (= char 41) (setq found_tag t) (setq is_end_tag t))
+ (list found_tag is_end_tag)
+ )
+ )
+
;; @return (list position_first_char found_tag is_end_tag)
(defun evilmi--find-lt-or-gt-char-at-current-line ()
- (interactive)
(let ((b (line-beginning-position))
(e (line-end-position))
(char (following-char))
@@ -103,8 +118,12 @@
))
(defun evilmi--operate-on-item (NUM fn)
- (if (memq major-mode evilmi-html-major-modes)
- (let ((rlt (evilmi--find-lt-or-gt-char-at-current-line)))
+ (let ((rlt (evilmi--find-lt-or-gt-char-at-current-line))
+ (test_single_char_tag (evilmi--at-single-char-tag))
+ )
+ (if (and (memq major-mode evilmi-html-major-modes)
+ (not (nth 0 test_single_char_tag))
+ )
;; prepare to jump
(when (nth 1 rlt)
(if (nth 2 rlt)
@@ -120,14 +139,14 @@
)
)
)
- )
- ;; just use evil-jump item
- (progn
- ;; evil has its own API, so normail Emacs API may not work
- (if (eq fn 'evilmi--push-mark)
- (evil-visual-char)
+ ;; just use evil-jump item
+ (progn
+ ;; evil has its own API, so normail Emacs API may not work
+ (if (eq fn 'evilmi--push-mark)
+ (evil-visual-char)
)
- (evil-jump-item)
+ (evil-jump-item)
+ )
)
)
)
- [nongnu] elpa/evil-matchit e44de538b9 196/244: clean code & doc, (continued)
- [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
- [nongnu] elpa/evil-matchit 9df39e73f7 011/244: Merge pull request #7 from purcell/patch-2, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 3c98cf064f 018/244: new framework v1.0.0, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 3e3652a162 012/244: marmalade need *-pkg.el, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit d92883b8c3 007/244: use evil API in html file some times,
ELPA Syncer <=
- [nongnu] elpa/evil-matchit acd0b7401b 026/244: simple jump algorithm upgraded v1.1.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit cf584eb62e 020/244: support c like languages, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit d5a7c947e6 023/244: minor wording in README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2d038e4d59 019/244: minor tweek of matching algorithm priority, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 1a663b20fd 029/244: #18 minor bug for python, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 210155ee8f 030/244: update developer guide v1.2.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 369eb7ca8c 032/244: minor typo in README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 694e6fba3d 045/244: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 13c528765e 050/244: updated README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 642fcdaf52 051/244: README updated, ELPA Syncer, 2022/01/06