Skip to content

Register public.data and modern developer formats so MacVim appears in Finder's "Open With" - #1705

Open
oxngon wants to merge 1 commit into
macvim-dev:masterfrom
oxngon:fix-open-with
Open

oxngon wants to merge 1 commit into
macvim-dev:masterfrom
oxngon:fix-open-with

Conversation

@oxngon

@oxngon oxngon commented Oct 17, 2026 •

Copy link
Copy Markdown

What this does

Adds two CFBundleDocumentTypes entries to src/MacVim/Info.plist so MacVim appears in Finder's right-click → "Open With" menu for files it isn't offered for today.

Fixes #1704.

  1. public.data at LSHandlerRank = Alternate — dotfiles and extensionless files (.zshrc, .env, .gitignore, Dockerfile). mdls reports these as public.data, and no document type claims it at the moment.
  2. public.json / public.yaml at LSHandlerRank = Alternate, plus CFBundleTypeExtensions for toml, ts, tsx, jsx, mjs, cjs, astro, svelte, graphql, gql, vue, go, rs. public.toml and public.configuration don't exist as system UTIs, hence plain extensions for those.

Why Alternate

So MacVim appears in the "Open With" menu without ever being made the default handler and without taking over icons or file associations — including for public.data, which is the fallback type for every file Launch Services can't classify more precisely. Other macOS editors handle it the same way: Zed ships public.plain-text / public.text / public.utf8-plain-text at Alternate, and SilentText ships public.data at Alternate. Happy to switch the developer-format entry to Default if you'd rather.

Scope

Testing

There's no test harness for bundle metadata as far as I can tell, so this is verified by inspection rather than by a test: the patched plist parses cleanly, CFBundleDocumentTypes goes from 76 to 78 entries, and that key is the only one that changes. The public.data claim matches the mdls output included in #1704.

AI disclosure

AI assistance was used to prepare this patch. The diff was validated and I reviewed it before submitting.

Adds two CFBundleDocumentTypes entries to src/MacVim/Info.plist so MacVim is
offered in Finder's "Open With" menu for:

- public.data (LSHandlerRank = Alternate): dotfiles and extensionless files
  such as .zshrc, .env, .gitignore and Dockerfile. Verified with mdls that
  Launch Services types these files as public.data.
- public.json and public.yaml, plus CFBundleTypeExtensions for toml, ts, tsx,
  jsx, mjs, cjs, astro, svelte, graphql, gql, vue, go and rs.

Both entries use LSHandlerRank = Alternate, so MacVim appears in the Open With
menu without ever being made the default handler or taking over icons or file
associations.

No change to UTExportedTypeDeclarations: this only adds claims, it does not
touch the exported-type registrations discussed in macvim-dev#916 / macvim-dev#1169.

The diff is a pure append; existing formatting and the "when adding support for
a new file type" comment at the top of the plist are untouched.

Refs macvim-dev#1704

AI assistance was used to prepare this patch. The result was validated by
parsing the plist and confirming that CFBundleDocumentTypes is the only key
that changed.

Assisted-by: AI assistant

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finder "Open With" does not offer MacVim for .json/.toml/.ts or for dotfiles (.zshrc, .env)

1 participant