Sublime Text 2's “Goto Anything” (or instant search) for Emacs?

后端 未结 5 1097
醉话见心
醉话见心 2021-01-30 17:36

I tried out Sublime Text 2 recently, and I found Goto Anything superbly useful for navigating source code (Ctrl-P file@symbol seems to work really well). Is there something simi

5条回答
  •  野的像风
    2021-01-30 18:32

    1. Heml is far from the fuzzy searching of ST3.

    2. Fiplr looks promising but doesn't work on my laptop (see first issue on the github)

    3. Simp.el looks like Fiplr but doesn't work either on my end.

    4. Projectile works for me! Here's your solution!

    I used also ido-mode and flx-ido for the fuzzy searching,

    and for the vertical way of displaying results I use this in my .emacs:

    ;; Display ido results vertically, rather than horizontally
    (setq ido-decorations (quote ("\n-> " "" "\n   " "\n   ..." "[" "]" " [No match]" " [Matched]" " [Not readable]" " [Too big]" " [Confirm]")))
    (defun ido-disable-line-truncation () (set (make-local-variable 'truncate-lines) nil))
    (add-hook 'ido-minibuffer-setup-hook 'ido-disable-line-truncation)
    (defun ido-define-keys () ;; C-n/p is more intuitive in vertical layout
      (define-key ido-completion-map (kbd "C-n") 'ido-next-match)
      (define-key ido-completion-map (kbd "C-p") 'ido-prev-match))
    (add-hook 'ido-setup-hook 'ido-define-keys)
    

提交回复
热议问题