Describe the bug
VIM has a nowrapscan option that stops searches when the end of the file is reached, as opposed to continuing back to the top of the file
To Reproduce
Steps to reproduce the behavior:
Expected behavior
When the bottom of the file is reached, the search should stop if nowrapscan can be set.
I really like the 'nowrapscan' feature of Vim because I often miss the 'search wrapping' message and start reading a second time a line that I have already read. It is also very handy when searching for a symbol from the current position to the end of file. It would be very nice to have this feature in Vscodevim!
I can't believe it that so few people cares about this feature.
When I search in vim, I don't need to care about the status bar and can concentrate on the text. Also, if I want to do wrapscan at the last match, I can just press "ggn" So there's no reason to turn on wrapscan for me.
However, with wrapscan on, I need to pay attension to the status bar to know if it have reach the end.
This is really annoying.
I care about being able to disable wrapscan, and I'm looking forward for it.
It enhances vim usability.
It protects the user from some of his errors, like evaluating that there are no more instances of the searched text when there actually are.
With nowrapscan one can search repeatedly until after the editor complains, and that's it. The software checks if there are no instances left, not the human or the developer.
I think there is a pull request to fix this and I believe it has been there a long time. I really wish this would get fixed.
Sent from my iPhone
On Jul 22, 2019, at 11:37 AM, Juan Lanus notifications@github.com wrote:
I care about being able to disable wrapscan, and I'm looking forward for it.
It enhances vim usability.
It protects the user from some of his errors, like evaluating that there are no more instances of the searched text when there actually are.
With nowrapscan one can search repeatedly until after the editor complains, and that's it. The software checks if there are no instances left, not the human or the developer.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
@jnothstine Where's the PR for this? I don't see one and am happy to implement this if there isn't an existing PR.
Nevermind, it's listed above. Was closed by author before being merged though.
My mistake, I thought I had seen one quite a while ago. Don’t know why I thought that. There isn’t one.
Sent from Mail for Windows 10
From: Jason Fields
Sent: Tuesday, July 23, 2019 5:16 PM
To: VSCodeVim/Vim
Cc: jnothstine; Mention
Subject: Re: [VSCodeVim/Vim] Does not support nowrapscan (#3155)
@jnothstine Where's the PR for this? I don't see one and am happy to implement this if there isn't an existing PR.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Partially inspired by aborted PR #3192, here is a patched version of searchState.js file that seems to do the trick : searchState.zip.
It replaces the file extensions/vscodevim.vim-1.10.0/out/src/state/searchState.js.
Wrapscan can be turned on by changing line 223 to wrapscan = true.
@contrib15 any interest in submitting a PR?
@J-Fields I will try but probably will need some help.
Most helpful comment
@J-Fields I will try but probably will need some help.