XVimProject / XVim

Xcode plugin for Vim keybindings
MIT License
5.16k stars 595 forks source link

incsearch functionality seems to be broken #843

Open bbudzon opened 9 years ago

bbudzon commented 9 years ago

If you place the cursor at the first line of a file and search for something located at the end of the file, regardless of whether ":set incsearch" or ":set noincsearch" commands were ran, it jumps to matches while you type. I have tried using the ":set" commands for this as well as the configurint via the ".xvimrc" file.

I will potentially investigate this as I find time, but for now I am focused a little more on other functionality I can improve upon in XVim.

If others can confirm, this would be good as all issues related to incsearch have been closed out.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

carrigmore commented 9 years ago

@neybis I don't think all vim commands work in xvim, some of them are not implemented. I tried here, it doesn't work either.

Some key mapping is also not working in .xvimrc, Ctrl-b works correct in XVim for scrolling page up, but if you try mapping backspace to Ctrl-b, it doesn't work. This works in Vim but not XVim, don't know why.

nmap < space > < c-f > "map space key to scroll down page, works nmap < backspace > < c-b > "map backspace key to scroll up page, doesn't work, sometimes cursor become double width in app when you press backspace.

screen shot 2015-10-19 at 17 23 10

bbudzon commented 9 years ago

Thanks for running some tests!

So, the FeatureList.md states that the "[no]incsearch" option is supported. So, we either should update the docs to say that it is not supported or fix the feature. My guess is it worked at some point because there is code for parsing the "[no]incsearch" option out of the .xvimrc it just seems to be that the feature is broken at this point, perhaps by an Xcode update or something of the sort. (EDIT: After code inspection, all of the handling for incsearch has been commented out. I'd suggest removing it from the features list until it is reimplemented.)

Also, can you open up a new issue for failing to map "space" and "backspace"? I have some more to comment on this behavior but would like to have the conversation there. Thanks!

carrigmore commented 9 years ago

@neybis I strongly agree your idea. Then maybe the update of XCode caused that not working. I will open a new issue on this.

JugglerShu commented 8 years ago

Sorry for the late response. I think this happens when I was working on refactoring some code. It seems that it is always 'incsearch' and you cannot turn it off. Is my understanding correct?

bbudzon commented 8 years ago

Yes, it does seem like it is always on @JugglerShu. I have gotten pretty involved at my new job as of late so I'm not finding as much time as when I was transitioning; so sorry I haven't investigated this further either. I still love this plug-in and will continue using it professionally for years to come. That being said, I will to try to support the project in any way I possibly can. Hopefully some of my software engineering experience will help and I can find more time down the road :)