bling / evil-visualstar Goto Github PK
View Code? Open in Web Editor NEWStart a * or # search from the visual selection
Start a * or # search from the visual selection
Hi,
ss the title sais the function should set a jump point to match the behavior of evil-search-word-forward.
Is this package still maintained?
The other issue "dot . repeat search, but probably shouldn't" is easy solved with
evil-declare-not-repeat.
It's normal in vim/evil-mode for an all lowercase search term to match with case insensitivity, while a search containing a capital letter matches with case sensitivity.
When evil-visualstar/persistent
is set, then repeated presses of * or # will re-evaluate the current selection ignoring the original selection. This can lead to odd results if the original selection resulted in a case insensitive search but one of the matches contains capital letters; suddenly the search changes to case sensitive!
For example, take the following text:
lorem ipsum match dolor sit amet, consectetur adipiscing match elit. Match vestibulum quis sem sodales, elementum odio id, ultrices magna. nunc dictum volutpat mi, id tristique ante porta eu. integer tristique tincidunt risus. sed match malesuada augue ut justo tempus rhoncus at scelerisque mauris. duis mattis dui vel turpis consectetur, ut dapibus nisi iaculis. proin elementum nulla at orci fringilla, et posuere libero sagittis. nunc est mauris, rutrum match in vestibulum ornare, malesuada a match nisl. nam sem nibh, feugiat match eget aliquam a, lobortis in est. nulla nec orci tempor, vulputate lorem sit amet, pharetra orci. etiam aliquam est nec aliquam Match gravida. match integer dui lectus, porta molestie accumsan sed, dapibus vitae magna. nam tempor vestibulum match scelerisque.
Observed behavior
Highlighting the first word "match" and pressing * takes you to the second "match" (all lower case) and shows "2/10" at the bottom of the screen, indicating 10 matches. Pressing * again takes you to "Match" with an upper case M and shows "3/10". Pressing * a 3rd time now does a case sensitive search for "Match", dropping you to the penultimate sentence and it now shows "2/2" on the screen. Pressing * a 4th time takes you back to the second sentence where the first "Match" with a capital M was found and it shows "1/2" at the bottom of the screen..
Expected behavior
Since the match starts with 10 items and a case insentive search, continued pressing of * should cycle through all 10 matches without switching to case sensitive search.
Only if the selection is altered (ex by pressing an arrow key on the keyboard, pressing n, etc) should the query be re-evaluated to cause * to run a different search.
You cannot press # or * to cycle through all matchs
I'm using https://github.com/bling/evil-visualstar to "shift + 8" to search within a document.
It would be awesome if pressing "/" which is bound to counsel-rg grabbed the highlighted term and searched using ripgrep in the project.
Could someone provide a pointer on how to go about this?
It's considered an anti-pattern to have a package do stuff as part of being required
. It would be nice if this was turned into a minor-mode so its functionality could be toggled. The only way to undo the effects of evil-visualstar
now is to manually rebind *
and #
.
If I do viw* the highlighting of the word doesn't disappear.
Any plans on adding functionality to use n/N to move to next/previous match?
Hi,
I'd like to know whether there's a way or an interactive function to unhighlight selected one.
Could you please let me know?
.
in vim is used to repeat commands, but most navigation commands are not remembered by .
. *
/#
are some such commands. It'd be nice if evil-visualstar didn't affect .
When evil-search-module is 'isearch
I can search something with visualstar and then press n/p to cycle through the matches like I would expect. When it's set to 'evil-search
though it instead searches for the last search made using /
or ?
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.