Open junwei-wang opened 3 years ago
I got the same issue and found a workaround that works fine for me:
use M-x org-edit-src-code
whenever I want to view or edit a src block.
The cause of the issue is not evil
but org-mode
that changes the syntax table so that we can use <
and >
for useful features in org-mode
. The side effect is it makes emacs regard <
and >
as parentheses unlike in emacs-lisp-mode
. This affects scan-lists
function that those jump commands (e.g., evil-jump-item
and forward-list
) eventually use at the core.
To me, it seems difficult to change the syntax table only for part of a buffer, so I decided to just stay with the syntax table defined by org-mode
.
Issue type
Environment
Emacs version:
GNU Emacs 27.2 (build 1, x86_64-apple-darwin20.6.0, NS appkit-2022.60 Version 11.6 (Build 20G165)) of 2021-09-23
Operating System: macOS Big Sur version 11.6 Evil version:Evil version 1.14.0
Evil installation type: Doom Emacs Graphical/Terminal: X Tested in amake emacs
session (see CONTRIBUTING.md): NoReproduction steps
evil-jump-item
when the point is on the parenthesis of the leftcond
, it will jump to the wrongly matched parenthesis (which is the secondly last right parenthesis in the code).Expected behavior
Try
evil-jump-item
when the point is on the parenthesis of the leftcond
, it will jump to last right parenthesis.Actual behavior
Try
evil-jump-item
when the point is on the parenthesis of the leftcond
, it jump to the second last parenthesis.Further notes