云计算 google Firefox 微软 Android 程序员 shell wordpress 编程 linux nginx mysql apache php 开源 java Windows centos Python Ubuntu

15個源碼語法著色來美化你的代碼

1. Prism

15个代码语法着色来美化你的代码
Prism is lightweight (1.5KB minified & gzipped), can be integrated so easily (just insert a CSS and JS file) and works fast. It is already used to beautify lots of code in Dabblet (an interactive CSS playground) so its pretty stable. New languages can be added and the functionality can be improved with the plug-in architecture and the look/feel can be completely styled via CSS.

Source

2. Rainbows

15个代码语法着色来美化你的代码
Rainbow is a fresh lightweight only 1.4kb written in JavaScript. It is only needed to use the JS module for the language to be highlighted for keeping things small. Also, the colors and fonts used can be completely customized with CSS theming support.

Source

3. Snippet

15个代码语法着色来美化你的代码
Snippet is a jQuery plugin that is built on top of the SHJS script for highlighting source codes in HTML documents. It supports many scripting languages from JavaScript to SQL and PHP to Ruby. There are 39 built-in and unique color schemes that you can switch in-between dynamically.

Source

4. Geshi

15个代码语法着色来美化你的代码
GeSHi is a highly customizable syntax highlighter that can be used to better present code snippets in websites. It is developed to be used in phpBB forum software but is also presented for separated use. This syntax highlighter supports almost every popular language like ActionScript, ASP, C, JAVA, php, Ruby, SQL & more (even robots.txt).

Source

5. Syntax Highlighter

15个代码语法着色来美化你的代码
SyntaxHighlighter helps a developer/coder to post code snippets online with ease and have it look pretty. It’s 100% Javascript based and it doesn’t care what you have on your server. It supports multiple languages and is very lightweight, compressed core library is 11kb plus whatever brushes you need. However, SyntaxHighlighter isn’t for those looking for ability to edit highlighted code. SyntaxHighlighter doesn’t allow users to edit the source.

Source

6. Google Code Prettify

15个代码语法着色来美化你的代码
This is the script used by the Google Code website. The script auto-detects the language used and highlights the code accordingly. It is also customizable via CSS.

Source

7. Hightlight.js

15个代码语法着色来美化你的代码
Highlight.js is very easy to use because it works automatically: finds blocks of code, detects a language, highlights it. It has support for 3rd party applications and provides a Firefox extension for viewing code that doesn’t have syntax highlighting.

Source

8. SHJS : Syntax Highlighting in JavaScript

15个代码语法着色来美化你的代码
SHJS is a JavaScript program which highlights source code passages in HTML documents. Documents using SHJS are highlighted on the client side by the web browser. SHJS uses language definitions from GNU Source-highlight. This gives SHJS the ability to highlight source code written in many different languages.

Source

9. Quick Highlighter

15个代码语法着色来美化你的代码
This online highlighter tool offers many coding languages you can choose to highlight together with several options, you can check/uncheck before highlighting code, Combine Style and HTML Code, Highlight inbuilt keywords, data types etc., Strict Mode, and Wrap overflowing text.

Source

10. Ultraviolet

15个代码语法着色来美化你的代码
Ultraviolet is a syntax highlighting engine that runs on Ruby. It has support for 50+ languages & 20+ themes.

Source

11. Pygments : Python Syntax Highlighter

15个代码语法着色来美化你的代码
It is a syntax highlighter that is built with Python. Pygments supports a wide range of languages, various output formats & it is usable as a command-line tool or as a library.

Source

12. Lighter for MooTools

15个代码语法着色来美化你的代码
Lighter is a free syntax highlighting class developed for MooTools. It was created with the MooTools developer in mind and takes advantage of many of the Framework’s features. Using it can be as simple as adding a single script to your webpage, selecting the elements you wish to highlight, and Lighter takes care of the rest.

Source

13. CodePress

15个代码语法着色来美化你的代码
CodePress is web-based source code editor with syntax highlighting written in JavaScript that colors text in real time while it’s being typed in the browser. It has code snippets, auto completion, shortcuts, and multiple windows features.

Source

14. Beauty of Code

15个代码语法着色来美化你的代码
This jQuery syntax highlighter plugin uses Alex Gorbatchev’sSyntaxHighlighter but with a twist: produces more xhtml-compliant codes.

Source

15. Jush JavaScript Syntax Highlighter

15个代码语法着色来美化你的代码
JavaScript Syntax Highlighter can be used for client-side syntax highlighting of following languages: HTML, CSS, JavaScript, PHP, SQL, HTTP andSMTP protocol, php.ini and Apache config.

延伸阅读

    评论