Silence evil-matchit errors
This commit is contained in:
parent
e2f06f0692
commit
1cc199497d
3 changed files with 16 additions and 8 deletions
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
(eval-when-compile (require 'subr-x))
|
(eval-when-compile (require 'subr-x))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +evil/matchit ()
|
||||||
|
"Invoke `evil-matchit', but silently."
|
||||||
|
(interactive)
|
||||||
|
(ignore-errors (call-interactively #'evilmi-jump-items)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +evil/visual-indent ()
|
(defun +evil/visual-indent ()
|
||||||
"vnoremap < <gv"
|
"vnoremap < <gv"
|
||||||
|
|
|
@ -71,10 +71,11 @@
|
||||||
`hs-toggle-hiding'. Otherwise, if on a delimiter, jump to the matching one with
|
`hs-toggle-hiding'. Otherwise, if on a delimiter, jump to the matching one with
|
||||||
`evilmi-jump-items'. If in a magit-status buffer, use `magit-section-toggle'."
|
`evilmi-jump-items'. If in a magit-status buffer, use `magit-section-toggle'."
|
||||||
(interactive)
|
(interactive)
|
||||||
(call-interactively
|
(ignore-errors
|
||||||
(cond ((eq major-mode 'magit-status-mode)
|
(call-interactively
|
||||||
#'magit-section-toggle)
|
(cond ((eq major-mode 'magit-status-mode)
|
||||||
((+evil-fold-p)
|
#'magit-section-toggle)
|
||||||
#'+evil/fold-toggle)
|
((+evil-fold-p)
|
||||||
(t
|
#'+evil/fold-toggle)
|
||||||
#'evilmi-jump-items))))
|
(t
|
||||||
|
#'evilmi-jump-items)))))
|
||||||
|
|
|
@ -276,7 +276,8 @@ across windows."
|
||||||
:commands (evilmi-jump-items evilmi-text-object global-evil-matchit-mode)
|
:commands (evilmi-jump-items evilmi-text-object global-evil-matchit-mode)
|
||||||
:config (global-evil-matchit-mode 1)
|
:config (global-evil-matchit-mode 1)
|
||||||
:init
|
:init
|
||||||
(map! [remap evil-jump-item] #'evilmi-jump-items
|
(map! [remap evil-jump-item] #'+evil/matchit
|
||||||
|
[remap evilmi-jump-items] #'+evil/matchit
|
||||||
:textobj "%" #'evilmi-text-object #'evilmi-text-object)
|
:textobj "%" #'evilmi-text-object #'evilmi-text-object)
|
||||||
:config
|
:config
|
||||||
(defun +evil|simple-matchit ()
|
(defun +evil|simple-matchit ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue