如何在 Emacs 中将“搜索"和“搜索重复"绑定到 C-f? [英] How to bind 'search' and 'search-repeat' to C-f in Emacs?

查看:22
本文介绍了如何在 Emacs 中将“搜索"和“搜索重复"绑定到 C-f?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Emacs 中将增量搜索 (C-s) 重新映射到 C-f?

How can I to remap incremental search (C-s) to C-f in Emacs?

我尝试做 (global-set-key (kbd "Cf") 'isearch-forward) 但第二个 Cf 不重复搜索,我需要使用 Cs.

I try to do (global-set-key (kbd "C-f") 'isearch-forward) but the second C-f does not repeat the search and I need to use C-s.

然后我尝试了 (global-set-key (kbd "Cf") 'isearch-repeat-forward) 但是第一个 Cf 没有开始搜索.

I then tried (global-set-key (kbd "C-f") 'isearch-repeat-forward) but the first C-f didn't start the search.

我什至尝试了 (global-set-key (kbd "C-f C-f") 'isearch-repeat-forward),但这会导致错误.

And I even tried (global-set-key (kbd "C-f C-f") 'isearch-repeat-forward), but this causes an error.

我想使用 C-f 进行搜索和搜索重复命令,我该怎么做?

I want to use C-f for search and search-repeat commands, how can I do this?

谢谢.

推荐答案

(define-key isearch-mode-map "C-f" 'isearch-repeat-forward)

这篇关于如何在 Emacs 中将“搜索"和“搜索重复"绑定到 C-f?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆