quicklook html 文件作为文本,而不是呈现的 html? [英] quicklook html files as text, not rendered html?
问题描述
OSX 的 Quicklook 呈现 HTML(使用插件/System/Library/Quicklook/Web.qlgenerator).我想看到纯文本,就好像我已将 .html 重命名为 .txt(这不是解决方案,不仅因为它很尴尬:我希望如果关闭 HTML 渲染,代码着色 Quicklook我使用的插件会启动,Quicklook 会显示漂亮的 HTML 代码).
我无法在不取消 Quicklook html 支持的情况下关闭 HTML,这就是我删除插件时发生的情况.我真的不知道我在 info.plist 中看到了什么,但删除 public.html 行同样糟糕.
提示?
这个问题与:https有关://apple.stackexchange.com/questions/51816/quicklook-html-plugin.
这是一个有效的解决方案(在 Mac OS X 10.7.5 上测试):
/install qlcolorcode(或 qlstephen)>
编辑
/System/Library/Quicklook/Web.qlgenerator/Contents/Info.plist
并注释以下两行:LSItemContentTypes <阵列><string>com.apple.webarchive</string><!-- <string>public.html</string>--><!-- <string>public.xhtml</string>--><string>public.svg-image</string></阵列>将上面删除的两行在同一个
下添加到LSItemContentTypes ~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist
(或~/Library/QuickLook/QLStephen.qlgenerator/Contents/Info.plist
)按 Command+Option+Esc 并重新启动 Finder.
现在 QuickLook 应该显示 HTML 文件的源代码(如果您使用 qlcolorcode,则语法高亮显示)而不是渲染它们.
OSX's Quicklook renders HTML (with the plugin /System/Library/Quicklook/Web.qlgenerator). I'd like to see plain text, as if I'd renamed the .html as .txt (that's not a solution and not only because it's awkward: I'm hoping that if the HTML rendering is turned off the code-coloring Quicklook plugin I use will kick in, and Quicklook will show me pretty HTML code).
I haven't been able to turn off HTML without killing Quicklook html support, which is what happens when I remove the plugin. I don't really know what I'm looking at in info.plist, but removing the public.html line is just as bad.
Tips?
This question is related to: https://apple.stackexchange.com/questions/51816/quicklook-html-plugin.
Here is a solution that works (tested on Mac OS X 10.7.5):
/install qlcolorcode (or qlstephen)
Edit
/System/Library/Quicklook/Web.qlgenerator/Contents/Info.plist
and comment the two lines as below:<key>LSItemContentTypes</key> <array> <string>com.apple.webarchive</string> <!-- <string>public.html</string> --> <!-- <string>public.xhtml</string> --> <string>public.svg-image</string> </array>
Add the two lines removed above under the same
<key>LSItemContentTypes</key>
into~/Library/QuickLook/QLColorCode.qlgenerator/Contents/Info.plist
(or~/Library/QuickLook/QLStephen.qlgenerator/Contents/Info.plist
)Press Command+Option+Esc and restart Finder.
Now QuickLook should display the source code of HTML files (with syntax highlighting if you use qlcolorcode) instead of rendering them.
这篇关于quicklook html 文件作为文本,而不是呈现的 html?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!