Switch to original buffer after chasing tags in Emacs

后端 未结 3 626
无人共我
无人共我 2021-01-22 14:33

I use M-. to jump to definitions of class/functions. Sometimes there are multiple classes with the same tag, so I need to use C-u M-. to jump to multip

3条回答
  •  北海茫月
    2021-01-22 15:01

    Icicles multi-command icicle-find-tag, bound to M-. in Icicle mode, combines all of what vanilla Emacs commands M-. (find-tag), M-, (tags-loop-continue), tags-apropos, and list-tags do. And it does more.

    You can complete against any tags, cycle (in different orders) among a subset of tags matching an additional pattern, and so on, visiting multiple tags in a single command invocation. You choose the tags you want to visit, in any order --- you need not visit each one in sequence.

    1. You first enter (using RET) a regexp that all tags you are interested in must match (it could be vacuous, to get all tags).

    2. After that, you can type a pattern that a subset of the tags and or their source files must match.

      That is, by default you can complete against multi-completion candidates that are composed of the tag itself and its source file name.

    3. You can choose candidates to visit using C-mouse-2 in *Completions* or by cycling among their names using down and up and then using C-RET to visit.

    4. You can return to your original location using M-* (icicle-pop-tag-mark). You can also return to it by just using C-g to finish your M-. invocation.

    More information here.

提交回复
热议问题