gpt4 book ai didi

emacs - 在 Emacs 中,如何从文件开头搜索?

转载 作者:行者123 更新时间:2023-12-05 02:23:58 26 4
gpt4 key购买 nike

在 Emacs 中,如何指示 isearch-forward 不从点的位置搜索,而是从文件的开头搜索?

最佳答案

最简单的选择是在调用 isearch 之前使用 M-< 将点移动到文件的开头。或者,您可以编写一个命令来为您执行此操作:

(defun isearch-from-buffer-start ()
(interactive)
(goto-char (point-min))
(isearch-forward))
(global-set-key [(control s)] 'isearch-from-buffer-start)

关于emacs - 在 Emacs 中,如何从文件开头搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17760269/

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