evil
evil copied to clipboard
[Feature] Support Vim RegEx token to match anything "\_."
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 tot
- 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 \_.