[TxMt] Searching for Objective-C documentation
throw-away-2 at macromates.com
Thu May 29 11:21:21 UTC 2008
On 27 May 2008, at 16:26, Dave Baldwin wrote:
>> If I create a new document, set language to Objective-C and enter
>> just ‘fprintf()’ and press ⌃H on that word, I get a “not
>> found” error message (in the HTML output window).
> Do you mean an empty HTML window with a 'Table of Contents'
> hyperlink that goes nowhere? - I get this if I put in fprintfff
> which I know doesn't exist. fprintf on the other hand gives the
> expected result for me.
> Do have a method called man_page (query) in your version of
I do, but I have a space in TM_SUPPORT_PATH, which was the problem.
> This is expecting the entire document as input whereas the original
> version is expecting the selected text or scope as input (I think).
> Maybe this is causing the problem?
Yes, I had not changed input of the command.
I made a few changes to docset_query.rb: http://pastie.textmate.org/205314
Presently there is the problem that Apple’s docs will eclipse the
POSIX / C lib stuff. For example ⌃H on open, read, exit, etc. will
give Apple documentation. So it might be necessary to both query
docset and man, rather than have man as a fallback.
When querying man, probably section 1 (shell commands) should be left
out. For example ⌃H on ‘ulimit’ will show the (less useful from C) <x-man-page://1/
ulimit> instead of <x-man-page://3/ulimit>.
More information about the textmate