FoxTrot Search Forum
FoxTrot Search for macOS Forum

Home » Public Forums » FoxTrot Search User Forum » is there a way to index files with extension .dart [one of google developing language]
Re: is there a way to index files with extension .dart [one of google developing language] [message #865 is a reply to message #864] Wed, 17 April 2019 19:25 Go to previous message
FoxTrot Engineering
Messages: 406
Registered: April 2020
Senior Member
Alex Fu wrote:

> I have tried:
> 1.in a Terminal.app window: defaults write com.ctmdev.foxtrot Aliases
> -array-add "{type='dart'; as='txt';}"

This should have worked. Make sure that:
- FoxTrot is not running when you enter the command
- the command is typed or pasted as a single line, followed by a return
- the FoxTrot index needs to be rebuilt afterwards

> 2Iinstalled visual studio code change .dart file type to always open with
> visual studio code.

Telling the Finder to open .dart files with a specific application is not enough; the application has to define the file extension in its info.plist file, and declare that it is a source code file; something like this:

UTExportedTypeDeclarations


UTTypeIdentifier
public.dart-source
UTTypeDescription
Dart source file
UTTypeConformsTo

public.source-code

UTTypeTagSpecification

public.filename-extension

dart





However, if this conflicts with a type declaration of another application (DiskImageMounter, in the case of dart, which associates the .dart extension to the com.apple.disk-image-dart UTI), then rebuilding the LaunchService database might be necessary, but I am not sure how this conflict will be arbitrated. Anyway, method 1 above should always work, independently of these LaunchServices considerations.

Additionally, there is yet another way to force some files to be indexed as plain text: set their HFS filetype to 'TEXT'. Kinda deprecated, but still working.

Jérôme - CTM Engineering

------------------------------------------------------------ ---------
"Try Foxtrot Personal Search... 1000 times better than spotlight
or GoogleDesktop. "
FoxTrot Personal Search user comment on http://emperor.tidbits.com

Download a demo version from www.foxtrot.ch
------------------------------------------------------------ ---------


Jérôme - FoxTrot Engineering
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Please answer my support inquiries!
Next Topic: Can we index epub?
Goto Forum:
  


Current Time: Sun Nov 24 03:27:19 GMT+1 2024