Syntax Highlight – 为 macOS 经典功能快速查看添加代码高亮,超过 150 种新文件类型

Syntax Highlight 是一款为 macOS 的经典功能快速查看(QuickLook)添加代码高亮的系统扩展。安装后将为快速查看新增 157 种文件类型。@Appinn

Syntax Highlight - 为 macOS 经典功能快速查看添加代码高亮,超过 150 种新文件类型 1

青小蛙在编辑 .yaml 文件的时候发现快速查看不支持这种格式,于是寻找了一番,就有了它。

Syntax Highlight

通过 brew 安装之后:

brew install --no-quarantine syntax-highlight

即可在应用程序中找到:

Syntax Highlight - 为 macOS 经典功能快速查看添加代码高亮,超过 150 种新文件类型 2

你可以在这里自定义样式、字体大小、页面尺寸,还可以具体调整每一个支持的格式,以及…自定义格式等等。

之后,需要前往系统设置页面,搜索快速预览,向下拉找刀快速查看,点击叹号,找到 Syntax Highlight 并打开即可:

Syntax Highlight - 为 macOS 经典功能快速查看添加代码高亮,超过 150 种新文件类型 3

之后就能通过 选中文件 > 空格 来预览这些文件了。

获取

对于不习惯 brew 的同学,青小蛙提供了网盘搬运,可直接运行(第一次运行后,可能需要前往系统设置 > 隐私与安全性,运行该程序运行)

支持的格式

  • Ada (.ada)
  • Adobe Acrobat Sequence files (.sequ) as XML
  • Adobe Flash ActionScript source files (.as)
  • Adobe Flex files (.mxml) files as XML
  • Adobe JSX script files (.jsx)
  • Apple workflow (.wflow) as plist (XML)
  • AppleScript (.scpt, .applescript, .ascr) automatically decompiled with osadecompile
  • Apple shell script files (.command)
  • Assembler source files (.asm, .s79)
  • Astro files (.astro) as JSX.
  • Autolit files (.au3, .a3x)
  • Azkaban flow files (.flow) as YAML
  • ATL files (.atl)
  • (G)AWK files (.awk)
  • Bash Script files (.bash)
  • Bezel (.bezel) as plain text
  • BibTex (.bib)
  • C shell script files (.csh)
  • C source files (.c, .h)
  • C# source files (.cs)
  • C++ source files (.cpp, .cp, .c++, .cc, .cxx, .hpp, .hh, .hxx, .ipp )
  • ClojureScript (.cli, .cljs, .cljc, .edn)
  • CMake files (.cmake)
  • CocoaPod files (.podspec) as Ruby
  • CoffeeScript source files (.coffee)
  • ColdFusion files (.cfc, .cfm, .cfml)
  • Configuration files (.conf)
  • Configuration profiles (.mobileconfig) as XML
  • Crystal language (.cr)
  • CSON source files (.cson)
  • CSS files (.css)
  • Cuda files (.cu) as C++
  • D (.d)
  • Dart source files (.dart) .dart is reserved by macOS and cannot be handled.
  • Diff files (.diff, .patch)
  • Dockerfile (.dockerfile)
  • Document Type Definition (.dtd)
  • DOS batch files (.bat, .cmd)
  • Dylang (.dylan)
  • ECore files (.ecore)
  • Eiffel project files (.ecf) as XML
  • Eiffel source files (.e, .ex, .exs)
  • Erlang source files (.erl, .hri)
  • F# source files (.fsx, .fs)
  • fish source files (.fish)
  • Fortran source files (.f, .for, .f90, .f95)
  • GCC linked files (.ld, .map, .d)
  • Gdscript (Godot engine) (.gd).
  • Golang source files (.go)
  • Google Earth KML Document files (.kml) as XML
  • Gradle source files (.gradle)
  • Graphics Language Transmission Format (.gltf) as JSON
  • Groovy source files (.groovy)
  • Haskell source files (.hs, .lhs)
  • HTML Abstraction Markup Language (.haml)
  • IDL source files (.pro)
  • INF files (.inf)
  • INI configuration files (.ini, .cfg)
  • Inno source files (.iss)
  • INO source files (.ino)
  • IntelliJ IDEA module (.iml)
  • Interface Builder Storyboard (.storybard) as XML
  • Interface Builder XIB (.xib) as XML
  • Java Compiled Class (.class) require javap to decompile
  • Java Properties files (.properties) as INI
  • Java Server Page files (.jsp)
  • Java source code (.java, .jav)
  • Java Web Start (.jnlp)
  • JavaFX ML (.fxml)
  • JavaScript files (.js, .jscript, .javascript, .mjs, .jsm)
  • JSON files (.json, .jsonc) ** On macOS 13 Ventura with Apple Silicon the .json extension is reserved by the system and cannot be handled.**
  • JSON Line files (.jsonl) as JSON
  • Julia source files (.jl)
  • Jupyter Notebook files (.ipynb) as JSON
  • Kermeta source files (.kmt)
  • Korn Shell script files (.ksh)
  • Kotlin source files (.kt, .kts)
  • LESS stylesheet (.less)
  • Lilypond files (.ly, .ily)
  • Lisp source files (.lisp, .lsp, .asd, .el)
  • Logos source files (.xm)
  • Lua source files (.lua)
  • Makefile files (.mk, .mak)
  • MAMEdev layout files (.lay) as XML.
  • Markdown files (.md, .rmd): please use QLMarkdown which allows you to choose whether to display formatted output or the highlighted source code.
  • Media Presentation Description (.mpd) as XML.
  • MF source files (.mf)
  • Microsoft Active Server Page files (.asp, .aspx)
  • Microsoft PowerShell files (.psm1, .psd1, .ps1)
  • NextFlow (.nf) as Groovy (Java)
  • Nim source files (.nim)
  • Nix Expression Language (.nix)
  • Node CommonJS module (.cjs)
  • Objective-C source files (.m)
  • Objective-C++ source files (.mm)
  • OCaml source files (.ml, .mll, .mly)
  • OpenSSH RSA public key (.pub) as plain text
  • OPML (Outline Processor Markup Language) files (.opml) as XML
  • Oracle PL/SQL files (.fnc, .prc, .trg, .pks, .pkb, .pck, .tps, .tpb, .typ, .tab, .avt, .con, .sqs, .vw, .mvw, .trg) as SQL
  • Paradox files (.sc)
  • Pascal source files (.pas)
  • Patch files (.patch, .diff)
  • PDE source files (.pde, .ino)
  • Perl script files (.pl, .pm, .t)
  • Planning Domain Description Language (.pddl) as Lisp
  • PHP source files (.php, .php3, .php4, .ph3, .ph4, .phtml)
  • Properties files (.properties) as INI
  • Property List files (.plist) dynamically decompiled with plutil On macOS 10.15 Catalina .plist is reserved by the system and cannot be handled.
  • Python source files (.py)
  • R (.r)
  • Racket (.rkt) as Lisp
  • RAML (.raml) as YAML
  • RDF files (.rdf)
  • README files (.readme) as plain text
  • reStructuredText document (.rst)
  • Rez files (.r)
  • Ruby on Rails files (.rhtml, .erb, .rjs)
  • Ruby Gems file (.gemfile)
  • Ruby script (.rb, .rbw)
  • Rust source files (.rs)
  • SageMath files (.sage) as Python
  • SAS files (.sas)
  • SASS/SCSS files (.scss)
  • Scala source files (.sc, .sbt, .scala)
  • Scheme source files (.scm, .ss, .sls, .sps, .sld, .sch) as Lisp
  • Shell script files (.bashrc, .zshrc, .sh)
  • Smali (.smali) as plain text.
  • Solidity source files (.sol)
  • SQL files (.sql)
  • Standard ML source files (.ml)
  • Stata files (.do, .ado) as plain text
  • Steam app manifest files (.acf) as plain text.
  • Svelte (.svelte) as HTML
  • Swift source files (.swift)
  • Symfony Twig files (.twig)
  • TCL source files (.tcl)
  • Tenex C Shell script files (.tcsh)
  • Terraform files (.tfvars, .tfstate, .tf, .hcl) as YAML
  • TeX and LaTeX files (.tex, .sty, .cls, .latex, .ltx, .texi, .ctx, .sty)
  • Text files (.txt, .text)
  • TOML files (.toml)
  • TypeScript files (.ts, .tsx, .cts, .mts) .ts and .mts are reserved by macOS and cannot be handled.
  • Visual Studio Code Workspace (.code-workspace) _ as JSON_
  • Verilog HDL files (.v, .vl)
  • VHDL source files (.vhd, .vhdl)
  • VIM script files (.vim)
  • Visual Basic source files (.vb, .bas, .basic, .vbs)
  • Vue source files (.vue)
  • XAML source files (.xaml) as XML
  • Xcode entitlement files (.entitlements) (dynamically decompiled with plutil) as XML
  • Xcode localizable strings files (.strings, .stringsdict) (dynamically decompiled with plutil) as XML
  • XHTML files (.xhtml)
  • XML files (.xml) Before macOS 12 Monterey .xml is reserved by the system and cannot be handled.
  • XSD Schema files (.xsd, .xquery, .xq, .xu)
  • XUL files (.xul)
  • YAML files (.yaml)
  • Z shell script files (.zsh)

一条留言

  1. NAME 2025/05/07 回复

写留言

Enable Notifications OK No thanks