-
Notifications
You must be signed in to change notification settings - Fork 109
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
Remember search value #464
Comments
This definition of handleConfirmSearch() in motion-search.coffee will fix this problem:
(The problem was because I had incremental search turned on and this capability was explicitly disabled for incrementalSearch. I've changed it so I just turn off incrementalSearch if I'm in this situation where I've already specified the search text.) |
I left this PR in my next PR as well. You may want to NOT merge this one and JUST merge that one, thereby pulling them both in without any merge conflicts... |
AFAIR why I disabled this feature for incremental-search is I want to search |
Hitting the initial If you use 2 slashes or 2 questions marks (followed by enter) then, according to the vim standard, it's the same as just hitting a single slash or question mark and searches for the previously-searched string. A nice convenience for people who are used to vim. If someone wants to search for a slash or a question-mark then the preferred (vim) way to do it is to press Now as I play around a little more deeply I see that regex is only partially implemented, so that does move it a step away from vim already. (For instance, I'm sure none of this is in any way new to you. I'm just thinking it through "out loud." My personal preference (obviously counting very little as I am extremely new to this project) is "when in doubt follow vim" - in other words, unless there is a significant advantage realized by deviating from vim then it makes sense (note name of project) to follow vim. In this case the disadvantage of needing to type a backslash before the slash or question-mark seems negligible to me. My preference - yours is probably different. So if you want to be able to search for Or, alternatively, it could become a configurable item for "vim-compatible with incremental search" or something like that. |
Not sure if I should ask here or elsewhere, but this discussion has sparked some curiosity - feel free to move the discussion elsewhere or ask me to do the same. What is the basic underlying philosophy on this package? I assumed, based on the name, that it was to implement vim capabilities within atom and expand beyond that when appropriate/possible to take advantage of the capabilities available in atom. If that's not the case, could you give an idea of what the philosophy is or perhaps point me to something that you've already written to explain it? In other words, what determines when a given feature follows vim and when it deviates from vim? |
I like pure Vim, but that not means I appreciate every feature/behavior of pure Vim. For 2nd question, I'll put comment after that. |
The closed issue labeled Also these comment include some info. I like Vim, I respect Vim but what I'm doing in this package is re-thinking each feature very non-strict way. I'm working for vim-mode-plus just ordered by my motivation. |
Btw if you make feature enhancement suggestion, please write concise and short explanation. Did you read https://github.com/t9md/atom-vim-mode-plus/wiki/IssueReport#ideal-issue-reporting. |
The feature you want is just "When incremental-search was enabled, Then I can suggest such like I don't want directly dive into the-vim-way discussion. |
I will try to be concise - it's a weakness of mine. What if I implement it so that |
Want make sure. You mean |
OK I think I understand your original request. Repeat last search with I didn't read all of your explanation because it's seems to be too long( I still not yet read all). |
Yes, If you agree I will need to make a few mods to my PR. |
The changes required to support this is really simple, I want to modify it by myself. What's the non-alternative original request? |
The non-alternative original request was what you do NOT want - |
Done in #474. |
When I search for text
/abc
and then after a few other movements decide to search again, I know that I can press
n
orN
but often I have pressed/
or?
in a natural, reflex action before I remember that it is the same search as before. In vim that's not a problem because if I don't specify any search value (just pressing RETURN) then it defaults to searching for the last text I searched for. In VMP searching for (nothing) (pressingRETURN
after/
or?
) seems to cancel the search.It would be nice if VMP duplicated vim's behavior as it is a more useful default. (Canceling the search already can be done by means of so there's no need for an additional way to do it. However, duplicating the most recent search would require moving my fingers over to the arrow keys - a very un-vim way to do things)
The text was updated successfully, but these errors were encountered: