如何在 Xcode 4.2 中设置外部编辑器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8223132/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 22:30:57  来源:igfitidea点击:

How to set an external editor in Xcode 4.2

xcode

提问by bradgonesurfing

All the posts I have found suggest going to the "file types" sub-section under XCode preferences and adding an external editor for a specific file type. However this options does not seem to be there on XCode 4.2.

我发现的所有帖子都建议转到 XCode 首选项下的“文件类型”子部分,并为特定文件类型添加外部编辑器。然而,这个选项在 XCode 4.2 上似乎没有。

回答by justin

It lookslike it just goes through LaunchServices, so... whatever you'd get by opening it using Finder by default.

看起来像它只是通过LaunchServices,所以...无论你使用搜索默认情况下打开它得到。

回答by Chris Parton

I had a look around and I couldn't figure it out. I notice that right-clicking on a source file, there is a greyed out option for "open in external editor." I couldn't figure out how to get that working at a glance.

我环顾四周,我无法弄清楚。我注意到右键单击一个源文件,有一个“在外部编辑器中打开”的灰色选项。我一目了然不知道如何让它工作。

A reasonable workaround would be to right-click on the source file you want to edit, click "Reveal in Finder," and then edit the file in the editor of your choice. The changes will be automatically updated in Xcode. I think you'll lose any undo/redo history you may have had for that file in Xcode though.

一个合理的解决方法是右键单击要编辑的源文件,单击“在 Finder 中显示”,然后在您选择的编辑器中编辑该文件。更改将在 Xcode 中自动更新。不过,我认为您将丢失在 Xcode 中对该文件可能拥有的任何撤消/重做历史记录。

回答by CHEN WAN CHENG

you have to make the editor you want is the default editor for the file type(cpp/h/lua ..). step: first time you 'show in finder', then open the file with 'open as', then choose the editor you want, make sure you choose the 'always open it'. then every is ok now.

你必须让你想要的编辑器是文件类型(cpp/h/lua ..)的默认编辑器。步骤:第一次“在finder中显示”,然后使用“打开方式”打开文件,然后选择您想要的编辑器,确保选择“始终打开它”。那么现在一切正常。

回答by Tim

I agree that you need to change the default setting for the file type in Finder. The best way to do that is to right-click any similar file in Finder. Select Get Info from the pop-up menu. Then look down the list for the "Open with" drop-down option. Select your chosen editor and then below the words "Use this option to open all documents like this one" click on "Change All..."

我同意您需要更改 Finder 中文件类型的默认设置。最好的方法是右键单击 Finder 中的任何类似文件。从弹出菜单中选择获取信息。然后查看“打开方式”下拉选项的列表。选择您选择的编辑器,然后在“使用此选项打开所有此类文档”下方,单击“全部更改...”

Then it will change the default for all your applications.

然后它将更改所有应用程序的默认值。