|
Re: is there a way to index files with extension .dart [one of google developing language] [message #862 is a reply to message #861] |
Wed, 17 April 2019 10:11 |
FoxTrot Engineering
Messages: 406 Registered: April 2020
|
Senior Member |
|
|
Alex Fu wrote:
> is there a way to index files with extension .dart [one of google
> developing language]
> thank you.
Yes; they are several ways to do so:
- install a Spotlight metadata importer (or an application that includes one) that handles this file type. As dart files are probably plain text files, this is probably not necessary though.
- install an application (e.g. an IDE or text editor) that declares the .dart file type as conforming to the UTI (Uniform Type Identifier) public.source-code or public.plain-text.
- in last resort, there is a command line setting in FoxTrot to make it index a specific file type as another one; first quit FoxTrot, then type the following command to a Terminal.app window:
defaults write com.ctmdev.foxtrot Aliases -array-add "{type='dart'; as='txt';}"
You will then have to rebuild your index.
See more FoxTrot hidden settings:
https://services.ctmdev.com/FoxTrot%20hidden%20preferences.h tml
Jérôme - CTM Engineering
--
------------------------------------------------------------ ---------
"If email is important to you, PowerMail should be important to you,
because I truly believe there isn’t a better one for the Macintosh."
PowerMail user comment on www.versiontracker.com
Download a demo version from www.ctmdev.com
------------------------------------------------------------ ---------
--
---
Jérôme - FoxTrot Engineering
|
|
|
|
|
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 |
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
|
|
|