搜索和替换:正确的快捷方式是什么? [英] Search and replace: What's the proper shortcut?

查看:28
本文介绍了搜索和替换:正确的快捷方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

非常简单的困境.用户需要能够在一大段文本中进行搜索和替换.执行此操作的代码是小菜一碟.没有问题.奇迹般有效!不要为此伤脑筋.这就解决了!这不是问题...

Very simple dilemma. A user needs to be able to do a search-and-replace in a large piece of text. Code to do this is a piece of cake. No problems there. Works like a charm! Don't break your head over that. That's solved! It's a non-issue...

不,问题是为这个函数定义一个好的快捷方式.虽然我更喜欢使用 CTRL+R 作为此功能的快捷方式(以及 CTRL-F 用于查找文本) 我注意到微软使用 CTRL-H 作为快捷方式!(还有 F3 来查找文本,虽然 CTRL+F 大部分也能用.)

No, problem is defining a good shortcut for this function. While I would prefer to use CTRL+R as shortcut for this functionality (and CTRL-F for finding text) I noticed that Microsoft is using CTRL-H as shortcut! (And F3 to find text, although CTRL+F mostly works too.)

那么,这个简单功能的首选快捷方式应该是什么?CTRL-RCTRL-H

So, what should be the preferred shortcut for this simple function? CTRL-R or CTRL-H

第二个 Q 补充点:CTRL-H 是从哪里来的?H是什么意思?至少,R 代表 Replace 而 H???

And second Q for additional points: Where does CTRL-H come from? What does the H mean? At least, the R stands for Replace but the H???

这与 Windows 应用程序的 GUI 设计有关.虽然这是小事,但与普遍接受的规范保持一致就很好!虽然 GUI 并不总是在程序员中流行,但让您的 GUI 与规范保持一致绝对是与编程相关的!

推荐答案

虽然我也认为 Ctrl+R 是更明显"和自然"的选择对于替换,由于一致性原因,我会选择 Ctrl+H.如果用户习惯于使用 Ctrl+H 替换文本(例如因为他们使用 MS Word),那么如果它也适用于您的应用程序,他们会很高兴... 然而,如果它不起作用,那会有点痛苦,因为他们必须改变他们的习惯.

While I also think that Ctrl+R is the more "obvious" and "natural" choice for replace, I'd go for Ctrl+H because of consistency reasons. If users are used to replace text by using Ctrl+H (e.g. because they use MS Word) then they'll be happy if it works in your app as well... however, if it won't work it will be a little pain because they have to change their habits.

对于搜索,我总是使用 Ctrl+F.如果您不需要 F3 用于任何其他目的,也只需将其用于搜索.那么这两种情况你都会被覆盖:)

For searching I always use Ctrl+F. And if you don't need F3 for any other purpose, just use that for searching as well. You're covered for both cases then :)

另请参阅乔尔的这篇博文.

这篇关于搜索和替换:正确的快捷方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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