Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect UTI registrations #1489

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jgvanwyk
Copy link

This is a continuation of #1468. This pull request fixes the incorrect UTI exported/imported UTIs as well as updates CFBundleDocumentTypes to use LSItemContentTypes instead of CFBundleTypeExtensions.

(This is a new pull request because I screwed up the previous repository while trying to synchronise it with the main branch).

jgvanwyk added 2 commits April 29, 2024 21:41
Currently MacVim exports many UTIs for filetypes it doesn't own, and its
UTI definitions for many of these filetypes are incorrect. This patch
aims to correct these UTI registrations and close macvim-dev#1169. The following
lists the UTIs that were changed and how.

export org.vim.vim-script -> export org.vim.vim-script
export org.vim.tex-file -> import org.tug.{tex,sty,cls}
export public.plain-text -> import public.plain-text
export public.c-header -> import public.c-header
export org.vim.pch-file -> import public.precompiled-c-header
export public.c-plus-plus-header -> import public.c-plus-plus-header
export org.vim.pch++-file
        -> import public.precompiled-c-plus-plus-header
export public.c-source -> import public.c-source
export public.objective-c-source -> import public.objective-c-source
export public.objective-c-plus-plus-source
        -> import public.objective-c-plus-plus-source
export public.c-plus-plus-source -> import public.c-plus-plus-source
export public.assembly-source -> import public.assembly-source
export com.apple.rez-source -> import com.apple.rez-source
export com.sun.java-source -> import com.sun.java-source
export com.apple.xcode.lex-source -> import public.lex-source
export com.apple.xcode.yacc-source -> import public.yacc-source
export public.mig-source -> import public.mig-source
export com.apple.symbol-export -> import com.apple.symbol-export
export com.apple.xcode.fortran-source
        -> import public.fortran{,-77,-90,-95}-source
export com.apple.xcode.pascal-source -> import public.pascal-source
export public.html -> import public.html
export public.xml -> import public.xml
export com.netscape.javascript-source
        -> import com.netscape.javascript-source
export public.python-script -> import public.python-script
export public.perl-script -> import public.perl-script
export public.php-script -> import public.php-script
export public.ruby-script -> import public.ruby-script
export public.shell-script
        -> import public.{shell,bash,zsh,csh,ksh,tcsh}-script
export com.sun.java-class -> import com.sun.java-class
export org.vim.patch-file -> import public.patch-file
export com.apple.xcode.strings-text
        -> import com.apple.xcode.strings-text
export com.apple.applescript.text -> import com.apple.applescript.text
export org.vim.as-file -> import com.adobe.actionscript
export org.vim.asp-file -> import com.microsoft.asp
export org.vim.aspx-file -> import com.microsoft.aspx
export org.vim.bib-file -> import org.tug.tex.bibtex
export org.vim.cs-file -> import com.microsoft.c-sharp
export org.vim.cfdg-file -> import org.contextfreeart.contextfree
export org.vim.csv-file -> import public.comma-seperated-values-text
export org.vim.tsv-file -> import public.tab-seperated-values-text
export org.vim.cgi-file -> import org.vim.cgi-script
export org.vim.cfg-file -> import org.vim.config-file
export org.vim.css-file -> import org.w3.css
export org.vim.dtd-file -> import org.w3.xml-dtd
export org.vim.dylan-file -> import public.dylan-source
export org.vim.erl-file -> org.erlang.erlang
export org.vim.fscript-file -> org.fscript.fscript
export org.vim.hs-file -> import org.haskell.haskell
export org.vim.inc-file -> import org.vim.include-file
export org.vim.ics-file -> import com.apple.ical.ics
export org.vim.ini-file -> import com.microsoft.ini
export org.vim.io-file -> import org.iolanguage.io
export org.vim.bsh-file -> import org.beanshell.beanshell
export org.vim.properties-file -> import com.sun.java-properties
export org.vim.jsp-file -> import com.sun.java-server-pages
export org.vim.lisp-file -> import org.vim.lisp-source
export org.vim.log-file -> import com.apple.log
export org.vim.wiki-file -> import org.mediawiki.wiki-source
export org.vim.ps-file -> import com.adobe.postscript
export org.vim.scm-file -> import org.vim.scheme-source
export org.vim.sql-file -> import org.iso.sql
export org.vim.tcl-file -> import tk.tcl.tcl
export org.vim.xsl-file -> import org.w3.xsl
export public.vcard -> import public.vcard
export org.vim.vb-file -> import com.microsoft.visual-basic
export org.vim.yaml-file -> import org.yaml.yaml
export org.vim.gtd-file -> import org.vim.gtd
export net.darlingfireball.markdown
        -> import net.darlingfireball.markdown
export org.vim.rst-file -> import org.python.restructuredtext
export org.vim.vba-file -> export org.vim.vimball-archive
export org.vim.vhdl-file -> remove
export org.lua.lua-source -> import org.lua.lua
export org.vim.v-file -> import org.ieee.vhdl
export org.vim.vh-file -> import org.ieee.vhdl-header
This removes the use of CFBundleTypeExtensions, which is deprecated.
@jgvanwyk
Copy link
Author

One thing I noticed while updating the CFBundleDocumentTypes was the use of LSIsAppleDefaultForType, which appears to be undocumented (and I would guess is intended to be private). Should this be removed?

@eirnym
Copy link
Contributor

eirnym commented Apr 30, 2024

I think it's ok if it's widely used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants