搜索后Xcode plist自动跳到顶部 [英] Xcode plist automatically jumps to the top after a search

查看:67
本文介绍了搜索后Xcode plist自动跳到顶部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Xcode项目中有一个文件foo.plist. plist很长.我按Command-F,然后在搜索框中输入栏". Xcode会适当地为我找到文本"bar".我需要将其更改为"fubar".但是无论接下来我要做什么,我都无法开始在该字段中输入内容.如果单击搜索结果,则Xcode滚动到顶部.如果删除搜索文本,Xcode也会跳到顶部.

I have a file foo.plist inside of an Xcode project. The plist is long. I hit command-F and enter "bar" into the search box. Xcode duly finds the text "bar" for me. I need to change it to "fubar". But no matter what I do next, I can't start typing into that field. If I click on my search result, Xcode scrolls to the top. If I delete the search text, Xcode also jumps to the top.

有什么办法告诉它使焦点集中在搜索结果上,让我来做点什么?

Is there any way to tell it to keep the focus at the search result and let me do something with it?

我唯一知道的是将plist编辑为源代码.确实可以,但是很笨拙.我宁愿将其作为plist进行编辑.

The only thing I'm aware of is to edit the plist as source code. That does work, but it's clunky. I'd much rather edit it as a plist.

推荐答案

我也看到了这种现象,而且我不认为Apple打算让Xcode这样做.这是我要做的解决方法:

I've also seen this behavior, and I don't think Apple intends for Xcode to do this. Here's the workaround I do:

  • 按⌘F开始新的搜索,然后在搜索字段中键入查询.
  • 单击.plist文件正文中的任何位置.忽略Xcode不会选择您单击的内容,而是选择第一行(Root词典)并滚动到它的事实.
  • 按⌘G快速返回到搜索文本的第一个实例. Xcode在您执行新搜索之前将正常运行.
  • Press ⌘F to begin a new search, then type your query in the search field.
  • Click anywhere in the body of the .plist file. Ignore the fact that Xcode will not select what you clicked, but will instead select the first row (the Root dictionary) and scroll to it.
  • Press ⌘G to quickly return to the first instance of the search text. Xcode will behave normally until you perform a new search.

这篇关于搜索后Xcode plist自动跳到顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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