如何在Mac OS X上将TextMate设置为默认文本编辑器?
我试过了
ln -s /Applications/TextMate.app/Contents/Resources/mate ~/bin/mate
export EDITOR='mate -w'
Run Code Online (Sandbox Code Playgroud)
但这不起作用.
我知道 Finder 有内置选项可以更改默认应用程序,但这仅适用于该扩展。我想为所有类型的文本文件提供我的编辑器(MacVim)。例如 .html、.xml、....gitignore 等,甚至未知的扩展名如 .this。
我已经尝试过duti但看起来不再工作了。
我也尝试过:
$ defaults write com.apple.LaunchServices LSHandlers -array-add '{LSHandlerContentType=public.plain-text;LSHandlerRoleAll=org.vim.MacVim;}'
$ defaults read com.apple.LaunchServices
{
LSHandlers = (
{
LSHandlerContentType = "public.plain-text";
LSHandlerRoleAll = "org.vim.MacVim";
}
);
}
Run Code Online (Sandbox Code Playgroud)
以及不同的尿路感染,例如public.text,public.utf8-plain-text。没有运气。
任何帮助表示赞赏。我不想再看到 TextEdit...