hlissner / evil-snipe

2-char searching ala vim-sneak & vim-seek, for evil-mode
MIT License
340 stars 25 forks source link

Freezes in a large Org file #43

Closed x-ji closed 7 years ago

x-ji commented 8 years ago

evil-snipe works fine for me in normal code files/small Org files. However when I try to perform a s/S search in a very large Org file which contains over 10000 lines, Emacs simply freezes and I had to press C-g to get out of it. Any idea what happened and how I might debug it? This is observed using Spacemacs on Windows. I'm yet to test it on Ubuntu.

System Info :computer:

(auto-completion better-defaults spell-checking syntax-checking semantic chrome search-engine typography games restclient colors eyebrowse themes-megapack gtags vim-powerline evil-snipe unimpaired fsharp emacs-lisp haskell org markdown html yaml shell-scripts javascript c-c++)
hlissner commented 8 years ago

What is evil-snipe-scope set to? If it's set to 'buffer (or worse, 'whole-buffer), evil-snipe will try to scan the rest of the document to highlight all matches.

I will put up a patch to improve highlight performance, but you can fix this altogether by setting it to 'visible (only scans the visible portion of the buffer) or 'line (only scans the current line), depending on your preference.

Let me know if that helps!

hlissner commented 8 years ago

To be more specific: (setq evil-snipe-scope 'visible) or (setq evil-snipe-scope 'line)

x-ji commented 8 years ago

Sorry, was occupied by something else and didn't try it out until today. Limiting the scope worked. Thanks. Though maybe I should leave the issue here to wait for the patch on highlight performance?

hlissner commented 7 years ago

Now, highlighting will only focus on the visible window. This should resolve any performance concerns caused by scanning entire files. Feel free to reopen if that isn't the case.