osyo-manga/vim-over

Inability to traverse next occurrence of pattern

Opened this issue · 1 comments

Igrom commented

After installing vim-over, I have desired to replace the default search built-in with OverCommandLine's enhanced version. Therefore, I have added the following entries into .vimrc:

nnoremap / :OverCommandLine<CR>/
let g:over#command_line#search#enable_move_cursor = 1 "so that :/ moves me to the searched word, instead of the beginning of the line

It works quite well. However, I noticed that the 'n' key is still mapped to the regular, unenhanced search. My intention is to remap it to vim-over's equivalent. My understanding is that the supplied replacement is (over-cmdline-substitute-jump-pattern).

I cannot get it to work. I've tried triggering the key/command in a variety of ways, nmapping, OverCommandLineMapping, OverCommandLineNoremapping and else. Nothing occurs when I trigger it.

I have edited autoload/over/command_line/substitute.vim and inserted the following on line 211, right after function! s:on_charpre():

if over#command_line#is_input(over#command_line#getline()) echo 'getline() and is_input() in accordance' else echo 'getline() and is_input() NOT in accordance' endif

The condition always fails. What's more, if I make explicit checks, like this:
if over#command_line#getline() == 'example' echo 'Passed'' else echo 'Failed' endif

I can get it to pass if I type "example".

hi, thanks for issues.
You can to next setting.

" setting keymapping
OverCommandLineNoremap <A-p> <Plug>(over-cmdline-substitute-jump-pattern)

" Start over commandline.
:OverCommandLine s/homu/mami/g

" Input key on over
<A-p>