Skip to content
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

Inability to traverse next occurrence of pattern #61

Open
Igrom opened this issue Sep 27, 2017 · 1 comment
Open

Inability to traverse next occurrence of pattern #61

Igrom opened this issue Sep 27, 2017 · 1 comment

Comments

@Igrom
Copy link

Igrom commented Sep 27, 2017

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".

@osyo-manga
Copy link
Owner

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants