junegunn / vim-oblique

DEPRECATED Improved /-search (experimental)
83 stars 7 forks source link

Searching for anything with the char 'r' stalls #44

Closed rgrinberg closed 9 years ago

rgrinberg commented 9 years ago

For example the sequence /rrr will stall as / for a few seconds and then show up as /rrr with search results. Possibly some incompatibility?

nkouevda commented 9 years ago

Do you have mappings that start with r? Try :cmap r.

rgrinberg commented 9 years ago

@nkouevda Nope. :cmap r gives no No mapping found

nkouevda commented 9 years ago

How about :cabbrev r?

rgrinberg commented 9 years ago

We might have found the culprit. There's a cabbrev from https://github.com/danro/rename.vim/blob/master/plugin/rename.vim#L14

I got rid of it and it seems to work.

rgrinberg commented 9 years ago

I have the same problem with gitv: https://github.com/gregsexton/gitv/blob/master/plugin/gitv.vim#L55

Any workaround? gitv is very useful to me.

junegunn commented 9 years ago

@nkouevda Thanks :) @rgrinberg I also use gitv, but does the delay really make it unusable? As soon as you press any key that breaks the cabbrev sequence, the delay will be cancelled.

rgrinberg commented 9 years ago

@junegunn Yes. Imo it's very noticeable and annoying. What is the cabbrev from gitv for? I just did a cabclear and see no loss of functionality.

junegunn commented 9 years ago

One thing I noticed is that /g<enter> doesn't finish the search immediately when cabbrev or cmap starting with g exists. I just pushed a fix to vim-pseudocl.

cabbrev of gitv is completely unnecessary, it simply replaces itself to Gitv.

vim-pseudocl, which is the foundation of vim-oblique, emulates cmaps and cabbrevs and it's the cause of the delay. Unfortunately, removing the delay is non-trivial. You can disable cmap/cabbrev emulation with let g:oblique#enable_cmap = 0.

rgrinberg commented 9 years ago

Yep I noticed that annoying delay as well. cabclear seems to be a great work around for me. None of the cabbrevs I head seemed useful anyway.

junegunn commented 9 years ago

Okay, so we have two workarounds, either to clear unnecessary cabbrevs or to completely disable cabbrev emulation. I'll let you know when I finally get to fix the delay. Thanks.