XcAddedMarkup icon indicating copy to clipboard operation
XcAddedMarkup copied to clipboard

How to open a file in Xcode and goto the line?

Open Whirlwind opened this issue 11 years ago • 3 comments

I test it:

∂a![filename:linenumber]<filepath:linenumber>ƒa

It is failed!

Whirlwind avatar Oct 15 '14 09:10 Whirlwind

In markuptests.h you can see the syntax how to link to a source code file but I do not have a way to specify the source code line to jump to.

mikr avatar Oct 15 '14 14:10 mikr

xed can jump to the line. Could you consider it?

Whirlwind avatar Oct 21 '14 08:10 Whirlwind

I already considered xed when I wrote the jump to source functionality. At the moment (Yosemite with Xcode 6.1) xed takes 5 seconds on my machine to actually move the cursor to the specified line. That is way too slow. Then although the cursor has moved, the lines in the source editor are not repositioned near the cursor but still show the same lines as before. Finally even if jump to source line worked, this is very brittle with respect to additions and deletions in the destination source file. The "Open Quickly…" function also supports line numbers but symbols as well which would be much more stable. Given enough time I could probably borrow what's needed from the FuzzyAutocomplete plugin to support this. I would like to have this as a feature as well but I can't promise if I ever find the time to actually implement this.

mikr avatar Oct 22 '14 10:10 mikr