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

后端 未结 5 1095
醉话见心
醉话见心 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:38

    Icicles offers some features that are similar to what it seems you are looking for.

    1. C-x b and C-x C-f, to choose buffers or files, allow multi-completion: you can type a pattern to match the buffer/file name and/or a pattern to match content in the buffer/file. Candidates are filtered incrementally as you type (what you call "instant" is what Emacs calls "incremental"). You can refine either or both search patterns progressively, narrowing the choices in different ways. You can visit any number of buffers/files that match, at the same time. You can also use the same method to search the marked files in Dired: C-F.

    2. C-c `(icicle-search) incrementally searches across multiple buffers or files. Again, progressive refinement etc.

    The main difference between #1 and #2 is this:

    • For #1, you just want to find matching buffers or files. You don't care immediately about finding particular occurrences --- any match suffices.

    • For #2, you provide the buffers or files to search, and you want to navigate among search hits.

    You can also use #1 to locate the buffers and files you want, then search their contents: The content-matching pattern you last used is available as the search pattern for Isearch (C-s).

提交回复
热议问题