Flutter 的 .dart 文件 macOS 默认是没法通过空格快速查看的,需要用 HomeBrew 安装插件 QLColorCode
brew cask install qlcolorcode
安装后编辑 ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist 文件
找到 Document types > Item 0 > Document Content Type UTIs (CFBundleDocumentTypes > Item 0 > LSItemContentTypes
添加一行 dart 文件格式
com.apple.disk-image-dart
保存后即生效,其他类型文件也可通过这个方法来快速预览
本文介绍如何在MacOS上使用HomeBrew安装QLColorCode插件,以实现快速预览Dart文件。通过编辑~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist文件并添加特定的Dart文件格式,即可实现Dart文件的快速查看。
1万+

被折叠的 条评论
为什么被折叠?



