t9md / atom-lazy-motion

Rapid cursor positioning with fuzzy search.
https://atom.io/packages/lazy-motion
MIT License
20 stars 3 forks source link

Search a single occurrence with auto land on throws #11

Closed chenglou closed 8 years ago

chenglou commented 8 years ago

Might be related to #2

Repro:

// cursor here
test

Type "t". See error.

(Atom Version 1.4.0)

t9md commented 8 years ago

Thanks for narrowing the cause. I still see occasional error when autoLand is enabled.

I've stopped middle of refactoring at Sep. last year , because my main interest moved to vim-mode-plus.

Btw I don't think autoLand is useful since it is difficult to get auto landed or not with lazy-search. So sometime autoLand cause bad side-effect to let extra key input go into buffer and change text. It always better to intentionally confirm.

So I want to remove autoLand config parameter how do you think?

chenglou commented 8 years ago

Auto land consistently throws this error for me.

In my mind auto land should have been the default. However, I haven't used this plugin enough to understand the implications, so maybe you're right. I think I'm fine having it removed if it's causing too much trouble. Feel free to close this.

chenglou commented 8 years ago

As an aside, this might replace the default find and vim-mode-plus's search for me. Not right now because sometimes I need to search stuff like ` and ". But yeah, instant fuzzy search is awesome (while we're at it, there's also fuzzaldrin-plus that the built-in autocomplete is testing on).

t9md commented 8 years ago

Thanks. Why I think autoLand is bad(unless this problem solved) is

When autoLand is enabled and worked, provided I'm searching text sample-text, at the input reached sm, autoLand happen, but before noticing autoLanded, I inputed extra pl. So this extra pl is handled by atom's keybinding system, if you use vim-mode, extra p cause pasting clipboard content.

t9md commented 8 years ago

Do you use vim-mode-plus incremental search? Since then I used to vim-mode-plus's inc-search, I become rarely use this package.

chenglou commented 8 years ago

Ah I see, makes sense. Never mind auto land then.

I don't use isearch; I used the search that comes with vim-mode-plus, and the default atom find. I kinda like the idea of fuzzy searching matches, but that might change.

t9md commented 8 years ago

My question is you enabled incremental search setting for vim-mode-plus? It disabled by default.

chenglou commented 8 years ago

Oh yeah, I have it enabled. What's the difference between that and isearch?

t9md commented 8 years ago

No diff and vim-mode-plus's is better since its support regexp search and if you star search with SPACE regexp is auto-escaped means you can do literal search.

Btw I think lazy-search is sometime useful and I have several idea to improve it wait for a week to improve it.

t9md commented 8 years ago

If you start. TYPO

t9md commented 8 years ago

I removed onLand from master and merged my experimental feature to special handling of SPACE char and lazy-motion:divide action.

Will release after I remember what I tried to do at 4 months ago.