inside / vim-search-pulse

Easily locate the cursor after a search
128 stars 8 forks source link

'c' + '?pattern' or 'c' + '/pattern' #24

Closed juanMarinero closed 2 years ago

juanMarinero commented 3 years ago

Expected behaviour

With vim --clean (no loading any plugin or ~/.vimrc) In next example line testing line word1 word2 If I go to last char ($), press c? and in command line type word1 (and press CR) I end in insert mode before char 2 of: testing line 2

With vim-search-pulse plugin

Instead I get (still ending in insert mode before char 2):

testing line :call search_pulse#Pulse()
2

Same problem with: 'c' + '/pattern'.

All fine with 'd' + '?pattern' or 'd' + '/pattern'

'c' + '?pattern' motion explained

As well as:

'c' + '/pattern'
'd' + '?pattern'
'd' + '/pattern'

See https://www.youtube.com/watch?v=ekjzz_LBbR0 or reddit post

plugin install + settings

Plug 'inside/vim-search-pulse'
let g:vim_search_pulse_duration = 250
let g:vim_search_pulse_color_list = [25, 26, 27, 27, 27]
augroup Pulse
        autocmd! User PrePulse
        autocmd! User PostPulse
        autocmd  User PrePulse  execute "normal zv"
augroup END

desktop

Ubuntu 20.04 Vim8.2

Thanks in advance!

inside commented 3 years ago

Hi @juanMarinero Just to let you know I've read your messages and have to make time to process them. Ping me if I'm taking too long.

Regards

juanMarinero commented 3 years ago

Hi @inside! In my question, the "Expected behaviour" is just easier to try one self. Did I at least explain the issue? Otherwise tell me and I retry.

yongrenjie commented 2 years ago

@juanMarinero I know this issue is a bit old, but if you're on Vim8.2 you can use the fix which I posted before you at #23 (I also have a fork which fixes this)

It won't work for nvim, but I never figured out how to get round that (and nvim still hasn't implemented state() so my fix won't apply)

To be honest, I'm not sure why I never made a PR, but I'll do it now.