Answers:
Helm有一个用于浏览本地和全局标记环的界面:helm-all-mark-rings
。
有关简要说明和屏幕截图,请参见迷你指南。
如果您更喜欢Ivy / Swiper / Counsel,请参阅counsel-mark-ring
。
我发现使用寄存器标记位置更容易:C-x r <space>
然后用字母标记,C-x r j
然后用字母跳回。我可以维护多个标记,在多个缓冲区之间交替使用时非常有用
除了您在此处获得的其他提示之外,我想我还应该提及这C-s
为您设置了标志,因此无需明确地进行操作。此外,许多命令是“移动可能很长的路要走”(beginning-of-buffer
和end-of-buffer
例如)也设置在这里你开始的标志。与其他使用标记的方法(弹出,交换点和标记等)一起,一旦您了解了缓冲区的工作原理,它就是使用缓冲区的一种非常有效的方法。还要注意,如果将文本拖到缓冲区中,则指向并标记包围被拖文本。
(您的问题是开放式的,因此可能会因为主要基于意见而被封闭。)
我使用的方法:冰柱 多命令 icicle-goto-marker
(绑定到C-- C-SPC
)在任意缓冲区(mark-ring
)中的标记周围跳闸,而icicle-goto-global-marker
(C-- C-x C-SPC
)在全局标记(global-mark-ring
)之间跳闸。
标记所在的文本行用作完成候选。您可以键入一些文本(例如,子字符串,正则表达式)以将候选对象缩小到匹配的行。您可以在匹配的行之间循环,访问任何您喜欢的行。如果您还使用库,crosshairs.el
则会用十字准线暂时突出显示您访问的标记的位置,因此您可以快速查看它的位置。
这是doc字符串的一部分icicle-goto-marker
:
Go to a marker in this buffer, choosing it by the line that includes it.
If `crosshairs.el' is loaded, then the target position is highlighted.
By default, candidates are sorted in marker order, that is, with
respect to their buffer positions. Use `C-M-,' or `C-,' to change the
sort order.
During completion you can use these keys:
`C-RET' - Goto marker named by current completion candidate
`C-down' - Goto marker named by next completion candidate
`C-up' - Goto marker named by previous completion candidate
`C-next' - Goto marker named by next apropos-completion candidate
`C-prior' - Goto marker named by previous apropos-completion candidate
`C-end' - Goto marker named by next prefix-completion candidate
`C-home' - Goto marker named by previous prefix-completion candidate
`<S-delete>' - Delete marker named by current completion candidate
Use `mouse-2', `RET', or `S-RET' to choose a candidate as the final
destination, or `C-g' to quit.
(global-set-key (kbd "s-m") '(lambda () (interactive) (push-mark)))
。