Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Adds two
CFBundleDocumentTypesentries tosrc/MacVim/Info.plistso MacVim appears in Finder's right-click → "Open With" menu for files it isn't offered for today.Fixes #1704.
public.dataatLSHandlerRank = Alternate— dotfiles and extensionless files (.zshrc,.env,.gitignore,Dockerfile).mdlsreports these aspublic.data, and no document type claims it at the moment.public.json/public.yamlatLSHandlerRank = Alternate, plusCFBundleTypeExtensionsfortoml,ts,tsx,jsx,mjs,cjs,astro,svelte,graphql,gql,vue,go,rs.public.tomlandpublic.configurationdon't exist as system UTIs, hence plain extensions for those.Why
AlternateSo 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 shipspublic.plain-text/public.text/public.utf8-plain-textatAlternate, and SilentText shipspublic.dataatAlternate. Happy to switch the developer-format entry toDefaultif you'd rather.Scope
UTExportedTypeDeclarations— this only adds claims. The exported-type registrations discussed in MacVim exports standard UTIs, and does it wrongly, messing up the system #916 / UTI registrations are wrong #1169 are untouched.LSItemContentTypesand addspublic.plain-text/public.source-code/public.script/public.shell-script, but none of the types here. Tell me if you'd rather I rebase Fix incorrect UTI registrations #1489 and fold these in, or trim this to only thepublic.dataentry — either is a small change.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,
CFBundleDocumentTypesgoes from 76 to 78 entries, and that key is the only one that changes. Thepublic.dataclaim matches themdlsoutput included in #1704.AI disclosure
AI assistance was used to prepare this patch. The diff was validated and I reviewed it before submitting.