gpt4 book ai didi

emacs - 在 Emacs 中移动到搜索查找的开始和结束

转载 作者:行者123 更新时间:2023-12-01 04:03:14 25 4
gpt4 key购买 nike

接受搜索时,您如何在搜索字符串的开头或结尾找到点?

因此,假设您执行 C-s "foobar",当我按 RET 时,我希望将光标放在找到的字符串的末尾,如果按 C-RET,则在开头。

谢谢

最佳答案

尝试这个:

(defun my-isearch-exit-other-end ()
"Exit isearch at the other end"
(interactive)
(when isearch-forward (goto-char isearch-other-end))
(isearch-exit))

(define-key isearch-mode-map (kbd "<C-return>") 'my-isearch-exit-other-end)

关于emacs - 在 Emacs 中移动到搜索查找的开始和结束,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11691313/

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