-
Notifications
You must be signed in to change notification settings - Fork 7
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
Display number of matches while searching #60
Comments
It's going to be slow if the file is large and the slowness will be immediately noticeable since Vim works synchronously. We'll probably have to limit the scope of search. I'll see if it can be done easily when I get some time. |
For some reason that slipped my mind. Do you know if it's possible to update the statusline from a neovim remote plugin, as well as if it's possible to tell when the user has entered a keystroke while in oblique's command line? I'd be interested in trying to implement that |
Looked through the api, you can run ex commands and call vimscript functions from it, so I think it may be possible (assuming ui updates as a result of the commands run happen while the user is typing into the oblique's search). You're probably more familiar with it than I am, but I'm playing with this now |
So it seems like oblique's command line blocks the UI from updating. Starting a neovim instance and connecting to it with the python client and trying to run
doesn't update the statusline until you leave the oblique command line. When you're in the typical command line mode or search mode (that is, immediately after pressing Here is the stupid script I made to test this:
opened it up with pseudocl is pretty much black magic to me, so I have no clue whether or not this is something that can be fixed in pseudocl, or a limitation of vim/neovim that would have to be fixed on that end I guess half the point of pseudocl is to allow for responding to every keypress the user makes in its command line from vimscript, which I guess can't be done otherwise. Still skimming the source of it. |
I'd be interested in finding a way to display the number of matches while searching. Currently I use vim-anzu (vim-indexed-search also exists, but I don't use it) together with oblique, but that only shows me the number of matches / which match number I'm on after I've finished searching and am going through the matches.
Do you have a gut sense of how complex this addition would be, as well as if it's even possible? My two thoughts would be to somehow display the number of matches (with a couple characters of padding to prevent the screen area the user is actually typing into from moving) to the left of the
/
search prompt, e.g.:[6 of 21] /searchin
The other option I can see, although I don't know if it's possible, is to update the statusline as the user types. I think that would be preferable if it can be done.
The text was updated successfully, but these errors were encountered: