objective-c 在 xcode 中启用选项卡?或者减轻没有它们的痛苦?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1184997/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Enabling tabs in xcode? Or lessening the pain of not having them?
提问by pbreault
I am currently using xcode and I find it's lack of tabs quite disturbing.
我目前正在使用 xcode,我发现它缺少标签非常令人不安。
I currently use command-shift-d to search through all the files, or ctrl-1 to open the history of files that were recently opened.
我目前使用 command-shift-d 搜索所有文件,或使用 ctrl-1 打开最近打开的文件的历史记录。
It works but I find it less effective than just tabbing through the few files i am currently working on.
它有效,但我发现它不如仅浏览我目前正在处理的几个文件有效。
Is there any way, third party or not, to enable some sort of tabbed organization? If not, is there any other way to quickly navigate through a subset of files?
有没有办法,第三方或不,启用某种标签式组织?如果没有,是否还有其他方法可以快速浏览文件子集?
回答by Ivan Marinov
XCode 4 now supports tabs. You can enable by selecting "View / Show Tab Bar" menu.
XCode 4 现在支持选项卡。您可以通过选择“查看/显示标签栏”菜单来启用。
回答by cdespinosa
Not really, but one alternative is View > Show Favorites Bar and drag five or six frequently-used source files into it. Not as flexible as tabs but satisfies your request for "quickly navigate through a subset of files".
不是真的,但另一种选择是“查看”>“显示收藏夹栏”,然后将五六个常用的源文件拖入其中。不如选项卡灵活,但满足您“快速浏览文件子集”的要求。
The traditional way is to use the detail view. Get the files you want in the Detail view by one of these means:
传统的方法是使用详细视图。通过以下方式之一在“详细信息”视图中获取所需的文件:
- Put them all in the same group, then select the group
- Enter a filter expression in the Search Bubble that narrows the items shown
- Define a Smartgroup that includes just the files you want
- Get a list of the files as a Find in Project result, then select that item in Find Results
- 将它们全部放在同一组中,然后选择该组
- 在搜索气泡中输入过滤器表达式以缩小显示的项目
- 定义一个仅包含您想要的文件的 Smartgroup
- 获取文件列表作为在项目中查找结果,然后在查找结果中选择该项目
Then you can use the Detail View as your list of interesting files and navigate through it quickly with the up and down arrows.
然后,您可以将详细信息视图用作您感兴趣的文件列表,并使用向上和向下箭头快速浏览它。
回答by Jeff
First of all, you can use Textmate (which I believe has Xcode integration). Otherwise:
首先,您可以使用 Textmate(我认为它与 Xcode 集成)。除此以外:
Window (Menu) -> Organizer (ctrl-command-o)
窗口(菜单)-> 管理器(ctrl-command-o)
At the bottom of that window, if you don't have two panes, click the square to the right of the gear. Now drag code files of interest to the left, grey pane--a single click or arrow up/down will open the file in the editor pane.
在该窗口的底部,如果您没有两个窗格,请单击齿轮右侧的方块。现在将感兴趣的代码文件拖到左侧的灰色窗格——单击或向上/向下箭头将在编辑器窗格中打开文件。
If you do open a bunch of windows, as vog suggested, you'll need to command-~ through them--not alt-tab.
如果你确实打开了一堆窗口,就像 vog 建议的那样,你需要命令——通过它们——而不是 alt-tab。
Cheers.
干杯。
回答by cody
You can navigate between files using "Recent Files"
您可以使用“最近的文件”在文件之间导航
Write simple applescript:
编写简单的applescript:
tell application "Xcode"
tell application "System Events"
keystroke "1" using {control down} -- open "Related Files"
key code 125 -- choose "Recent Files" ("keystroke down" doesn't work)
keystroke return -- enter to "Recent Files"
key code 125 -- choose previous file
end tell
end tell
And bind it to some shortcut using for example FastScripts(free up to 10 bindings)
并使用例如 FastScripts 将其绑定到某个快捷方式(最多释放 10 个绑定)
I have this script on "Control" + "`". (XCode 4)
我在“Control”+“`”上有这个脚本。(XCode 4)
Hope this will help
希望这会有所帮助
回答by vog
The Xcode source code editor allows you to choose the file from a list. It's two clicks instead of one (as it would be with tabbing), but it's better than nothing.
Xcode 源代码编辑器允许您从列表中选择文件。这是两次点击而不是一次(就像使用 Tab 键一样),但总比没有好。
In addition, you can simply Alt-Tab through your open source code windows. This is not slower than tabbing, and has the same effect since the source code windows are usually placed exactly one in front of another.
此外,您可以通过开源代码窗口简单地使用 Alt-Tab。这并不比 Tab 键慢,并且具有相同的效果,因为源代码窗口通常正好放在另一个窗口的前面。
回答by Sneakyness
You'll definitely want to read through this.(XCode Tips and Tricks you wish you know about two years ago - SO)
你肯定想通读一遍。(两年前你希望你知道的 XCode 提示和技巧 - 所以)
回答by kodz
You may also try an Xcode plugin I've just released - it's called Code Pilotand solves a lot of issues of Xcode's navigation, making it more TextMate/Eclipse-like.
你也可以试试我刚刚发布的一个 Xcode 插件——它叫做Code Pilot,它解决了 Xcode 导航的很多问题,使它更像 TextMate/Eclipse。
Check it out here: http://macoscope.net/en/mac/codepilot/
在这里查看:http: //macoscope.net/en/mac/codepilot/
I hope this helps!
我希望这有帮助!
回答by VARUN ISAC
It is simple with XCode 7.2
XCode 7.2 很简单
GoTo View>>Show Tab Bar
转到视图>>显示标签栏
This will show the tab bar.
这将显示标签栏。
RightClick on the New Tab and click -->"NEW TAB"
右键单击新选项卡,然后单击 -->“新选项卡”
Then We can see all the files in tabs.
然后我们可以在选项卡中看到所有文件。

