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

[Feature] Support Vim RegEx token to match anything "\_." #1936

Open
bartelmarkus opened this issue Sep 16, 2024 · 0 comments
Open

[Feature] Support Vim RegEx token to match anything "\_." #1936

bartelmarkus opened this issue Sep 16, 2024 · 0 comments

Comments

@bartelmarkus
Copy link

bartelmarkus commented Sep 16, 2024

Issue type

  • Enhancement request

Environment

Emacs version: GNU Emacs 29.4 (build 2, x86_64-w64-mingw32)
of 2024-07-05
Operating System: Windows 10
Evil version: 1.15.0
Evil installation type: MELPA
Graphical/Terminal: Graphical
Tested in a make emacs session (see CONTRIBUTING.md): No

Reproduction steps

  • Start Emacs
  • make sure that evil-ex-search-vim-style-regexp is set to t
  • Create a new buffer with the content
foo
bar
baz

Expected behavior

  • Run search with f\_.*ba
  • Match:
foo
bar
ba
  • In the background, the token is transpiled to Emacs Lisp RegEx \\(.\\|\n\\) or [^z-a] or something similar that does the trick
  • Compare the anything token from rx: It compiles to [^z-a]

Actual behavior

  • Can't parse the token \_. like Vim does, nothing is found
  • only workaround constructs are possible like an alternation with the f\(.\|\n\).*ba, because the dot itself doesn't match newline characters

Further notes

The original Vim feature is documented in :h \_.

@bartelmarkus bartelmarkus changed the title Implement Vim RegEx token to match anything "\_." [Feature] Support Vim RegEx token to match anything "\_." Sep 17, 2024
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

1 participant