Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text-mode can't use simple rule #135

Open
zijianyue opened this issue Sep 18, 2021 · 7 comments
Open

text-mode can't use simple rule #135

zijianyue opened this issue Sep 18, 2021 · 7 comments

Comments

@zijianyue
Copy link

No description provided.

@zijianyue
Copy link
Author

In simple rule, cursor can jump between "{" "}",even the cursor is after "}", no need on it.

@redguardtoo
Copy link
Owner

Could you give me an example? I don't understand.

@zijianyue
Copy link
Author

zijianyue commented Sep 22, 2021

For example, in a text-mode buffer, the content is as below, using evil-matchit, I can jump to ‘{’ when the cursor is on ‘}’ exactly, but what I expect is when the cursor is after ‘}’, I can jump to ‘{’ as well.

{
"number": "123",
"key": "www"
}

}{{cursor}}

@redguardtoo
Copy link
Owner

C-h v evil-plugins, you can see it's not set up for text-mode, use evilmi-load-plugin-rules. See README. You can even define your own rules.

@zijianyue
Copy link
Author

I have this config, but it doesn't work now.

(eval-after-load "evil-matchit"
'(progn
(evilmi-load-plugin-rules '(text-mode) '(simple)) ;
(global-evil-matchit-mode 1)
))

@redguardtoo
Copy link
Owner

When you say In simple rule, cursor can jump between "{" "}",even the cursor is after "}", no need on it., what's the major mode?

@zijianyue
Copy link
Author

zijianyue commented Sep 25, 2021

Text-mode,it's a log file which have some json format content, in such case , I often need jump between { and } ,but I dont't want to lay the cursor at { or } exactly, I hope it cant work even before { or after } .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants