I've tried adding highlight_language and pygments_style in the config.py and also tried various ways I found online inside the .rst file. Can anyone offer any advice on how to get the syntax highlighting working?
Sorry, it turns out that program arguments aren't highlighted (the test I was using)
I have just started using Phalcon and am amazed by it's versatitlity (previously used CakePHP). However, to make effective use of their Volt language I need syntax highlighting for it in Notepad++ but cannot find it anywhere.
Can anyone direct me to a package to install to introduce syntax highlighting for this language in Notepad++?
Alternative
I realise that such a package may not exist for Volt in Notepad++ yet. In that case can anyone suggest:
a) an alternative text editor that does have syntax highlighting for Volt (preferably as minimalistic and simple as Notepad++); or
b) a guide that would help get me started on making the xml file to enable syntax highlighting for Volt in Notepad++ (I've got a bit of time, no harm in trying...).
Almost solution
The answer to this question implies that Twig is similar to Volt.
Using this definition for Twig and assigning it to .volt extensions currently. However, if a better version exists that would be good (i.e. one which keeps the normal syntax highlighting for the HTML but also adds in keyword, comments, etc. highlighting for the Volt parts).
I used twig syntax highlighting with Aptana and it worked alright.
You could also look in to Atom where there is a volt syntax available language-volt.
I use Atom for pretty much everything. It supports the volt syntax as well as a bunch of other useful plugins / extensions.
I just knew that I can syntax highlight code blocks here using Prettify but I don't really get the idea. Somebody edited my other question by highlighting my code but I would like to know how I can do it myself so I can present my code problems in a nicer way.
I followed other similar question and answer here and downloaded Prettify source files comprised with set of javascript but I don't expect to upload any of those on StackOverflow to be able to syntax highlight my code here.
Can anyone explain this in a way that I can understand?
There are many free etherpad implementations since it went open source. Does etherpad support syntax highlighting or is some kind of add-on available?
I tried
http://typewith.me/
http://sync.in/
http://www.piratenpad.de/
You can install a plugin in Etherpad called "Syntax highlighting".
To install the plugin simple visit /admin/plugins on your Etherpad deployment and then search for "syntax" and click Install.
For details on the plugin see https://npmjs.org/package/ep_syntaxhighlighting
UPDATE: Syntax highlighting is available as a plugin in the current Etherpad -- see John's answer below.
The original etherpad creators were working on highlighting, but complex sync-problems made them abandon that feature -- as documented in a .txt file in the source code.
Many etherpad sites run on a mostly standard etherpad.org release. If highlighting would get added, you'd probably see it quickly adopted at sketchpad.cc. Perhaps watch them and wait? Or if you really want highlighting, a good first attempt/experiment would be the read-only view. Example: http://sketchpad.cc/sp/pad/view/BACfNDybki/latest
Try to use some existing highlighting javascript library to highlight the text inside DIV#padcontent or perhaps $('DIV#padcontent')[0].textContent
The complexity is getting the highlighted text formatting back into the DB. For this you might need to use operational transformations (which is the foundations of etherpad and as of recently also used in the Google Docs word processor). A tutorial: http://www.codecommit.com/blog/java/understanding-and-applying-operational-transformation
The etherpad plugin ep_codepad provides syntax highlighting - based on highlight.js - for etherpad.
https://www.npmjs.com/package/ep_codepad
I'm looking for a general purpose syntax highlighting library, to output to html.
It's for use within a ruby app, so a ruby library would be good, but an excellent utility which can be piped in and out of would do
Also needs to guess the appropriate language to highlightsy by itself
HTML/CSS/JavaScript based syntax highlighter solutions are the most popular and work well with different server technologies including Ruby.
SyntaxHighlighter (RECOMMENDED) is here to help a developer/coder to post code snippets online with ease and have it look pretty. It's 100% Java Script based and it doesn't care what you have on your server.
Syntax highlighting library for various languages at Rubyforge.org. Has built-in support for converting source code to syntax-highlighted HTML.
SyntaxHighlighter for WordPress. It allows you to easily post syntax highlighted code all without losing its formatting or making an manual changes.
Prettify. A Javascript module and CSS file that allows syntax highlighting of source code snippets in an html page.
GeSHi - Generic Syntax Highlighter. GeSHi started as an idea to create a generic syntax highlighter for the phpBB forum system, but has been generalised to this project. GeSHi aims to be a simple but powerful highlighting class, with the following goals: (1) Support for a wide range of popular languages (2) Easy to add a new language for highlighting (3) Highly customisable output formats
JUSH is a syntax highlighting component written in JavaScript. It highlights HTML, CSS, JS, PHP and SQL code embedded into each other. Beside syntax highlighting, it provides links to the documentation for all supported languages.
SyntaxHighlighter for Windows Live Writer at CodePlex.com (just in case :)
And here a few blog posts on the subject:
Syntax Highlighting for Ruby Made Very Easy
Syntax highlighting in Ruby
Have you looked at Google's syntax highlighter? I believe SO uses it?
http://code.google.com/p/syntaxhighlighter/
Edit: Actually I believe it is Prettify:
http://code.google.com/p/google-code-prettify/
Some options are:
Syntax - Its really broad, but I think it has some licensing concerns (Syntax is GPL)
Coderay - I use this on my blog, it's pretty limited, but is functional
Ultraviolet which support a ton of languages (anything that textmate can do)
If you are willing to bridge into Python there is Pygments, which supports a ton of languages
Try rouge. It's pure ruby, compatible with pygments, and actively developed.
You might want to take a look at Colorer. It doesn't seem to have bindings for Ruby, but there are for Perl and PHP, maybe one would be able to hack a binding together for Ruby on that basis.
Scintilla can be used with C++ code. I don't know about is there a way to use C++ applications in Ruby.