branch: elpa/evil-matchit commit cdb9b90381ac0a225b01fb99472f5b23b612eb6e Author: Chen Bin <chenbin...@gmail.com> Commit: Chen Bin <chenbin...@gmail.com>
extra json support --- evil-matchit-simple.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/evil-matchit-simple.el b/evil-matchit-simple.el index 98c0c57dc2..f9cb30b9d2 100644 --- a/evil-matchit-simple.el +++ b/evil-matchit-simple.el @@ -42,16 +42,16 @@ If it's t, use simple jump.") (let (rlt) (cond - ;; code "(function(...) { ..." - ;; code "} else {" - ;; css-mode use characters ".:-" - ((or (string-match-p "^[ \t]*[\(\}]?[.:_a-zA-Z0-9-]+.*{ *\\(\/\/.*\\)?$" cur-line) - (string-match-p "^[ \t]*[\(\}]?[.:_a-zA-Z0-9-]+.*{ *\\(\/\*[^/]*\*\/\\)?$" cur-line)) + ;; code: function(...) { ... + ;; code: } else {' + ;; code: "jsonField": { + ;; Please note css-mode use characters ".:-" + ((string-match "^[ \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) + ((and (string-match "^[ \t]*[\}]? \\(if\\|el[a-z]*\\) *.*{ *?$" cur-line) (not (eq (following-char) ?}))) (setq rlt 1)) @@ -60,7 +60,7 @@ If it's t, use simple jump.") (save-excursion (forward-line) (setq cur-line (evilmi-sdk-curline)) - (if (string-match-p "^[ \t]*{ *$" cur-line) + (if (string-match "^[ \t]*{ *$" cur-line) (setq rlt 2))))) rlt))