gpt4 book ai didi

emacs - isearch/在 emacs 中出现可见区域

转载 作者:行者123 更新时间:2023-12-03 17:54:34 25 4
gpt4 key购买 nike

我对这里的术语有点不确定,但是否有一些简单的方法来进行仅限于当前缓冲区可见区域的增量搜索(或可能发生)?

最终我想要像增量 ace-jump-mode 这样的东西.

最佳答案

您可以使用缓冲区缩小将正常的增量搜索限制在当前缓冲区的可见区域:

(defun window-search ()
"Interactive search, limited to the visible portion of the buffer."
(interactive)
(save-restriction
(narrow-to-region (window-start) (window-end))
(isearch-forward)))

关于emacs - isearch/在 emacs 中出现可见区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11569635/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com