Spotlight indexes files that have the extension "txt" or the file
type "TEXT". BBEdit creates files with file type "TEXT" but I
would like to start using a custom extension
I realized that it would be very valuable to me to be able to find my
PHP functions by name in Spotlight (I am the author of a complex CMS
which is spread over a hundred plus PHP files). So I tried to apply
the suggestion Alex da Franca gave here, with pleasant results.
A simple modification of the the RichText.mdimporter is needed.
I modified /Library/Spotlight/SourceCode.mdimporter
It seemed more appropriate in this case, and also I deeply dislike
changing things inside /System. Looks like a recipe for a disaster
waiting to happen.
First find the type (according to Spotlight) of the files you want
indexed using this command in the Terminal:
mdimport -n -d1 theFileName.ext
which outputs something like:
Import 'theFileName.ext' type 'someSpotlightType' no mdimporter
Now take that file type (someSpotlightType) and add it to the
Info.plist file located at:
/System/Library/Spotlight/RichText.mdimporter/Contents/Info.plist.
You can use Property List Editor to do this, if you have Xcode
installed.
Add it in the array for LSItemContentTypes:
Now go back to the Terminal and import the files in question
(mdimport /PathToFiles/ToImport),
You first need to logout and login. Then it works.
It would be exceedingly nice if BBEdit, when I click one of my source
files in the Spotlight menu, would jump to the fuction name I have
just looked for. Like Preview.app does when you click in Spotlight a
PDF. Could we have that, Rich, pretty please?
L.A.
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>