0

I'm working with a huge code base in Xcode, and I want to open a file given its path, eg project1/dir1/dir2/dir3/dir4/dir5/dir6/somefile.mm

Where in Xcode can I go to open a file with its path? Is there a keyboard shortcut?

1 Answer 1

2

Cmd + Shift + O opens a bar where you can type either a filename or a path. It also has suggestions and auto-complete.

Sign up to request clarification or add additional context in comments.

4 Comments

Hmm that's not working--nothing happens when the file path is entered, or when hitting enter
Are you pasting the full path? I'm not sure if that bar uses the file path or the project folder path, I usually just type part of the file name and it works. You should play around with it to see how you can make it work as you want, but I'd recommend just typing the filename, since they are usually unique in compiled files.
I'm trying the full file path, and there's multiple of the same document Root.plist so it would be really helpful to be able to use the path. I was able to open it by searching Root.plist but had to open a couple different ones before finding the right one. Though I found it I still want to see if there's a way to use the file path
Thanks, suggested shortcut works with relative paths very well. (Xcode 10.3)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.