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.
Related
I've recently started coding TypeScript in VS Code, but I did thought that the syntax highlighting is really bad. So I started to Google around and found out that at its best it could look like this:
Mine looks like this:
I am using TypeScript 2.0.3 and working on a mac 10.11.6.
What helped me was what #Reg1nleifr mentioned in their comment: Switching the color scheme.
Go to Preferences -> Color Theme and change it to Dark+ (default dark).
The syntax highlighting in VSCode is driven by textmate files. This is the repository : https://github.com/Microsoft/TypeScript-TmLanguage/
It recently (16 days ago) went through a massive refactor : https://github.com/Microsoft/TypeScript-TmLanguage/pull/257 so hopefully it should get better if you update to vscode latest.
More
The best highlighting would come if it was done using the same code the compiler uses to parse the code. That isn't how vscode is architectured at the moment, so I do have my own code that does it : https://basarat.gitbooks.io/alm/content/features/typescript.html#syntax-highlighting
I have WebStorm and really like it. I don't use PHP very often, but I'm working on a project that uses it...
So, I'm trying to get basic syntax highlighting in WebStorm.
I've tried using this plugin already (incompatible):
http://plugins.jetbrains.com/plugin/6610
And I've followed the steps in these threads:
Webstorm: how to extend to handle PHP files or even just higlight code correctly?
Is it possible to get Ruby syntax highlighting in PHPStorm?
I am using this textmate bundle:
https://github.com/textmate/php.tmbundle
It's being recognized by WebStorm, and the proper files are being associated with TextMate bundles, yet I still have no syntax highlighting.
At this point, I've just written all the stuff without the highlighting, but it seems a bit ridicules that I cannot get it to work.
I sent an email to technical support, and they just pointed me back to those resources and then suggested that I buy PHPStorm. And the IDE keeps suggesting that I buy IntelliJ IDEA Ultimate.
Has anybody else run into this problem?
https://github.com/textmate/php.tmbundle bundle uses non-documented 'injection' - feature that's not currently supported - thus no highlighting is actually recognized. See RUBY-14273
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.
Is there a utility that will generate html or css for blocks of code (.net c#) when you post it on a website?
I have seen several websites with very nicely formatted code and I dont believe they do this manually.
Google prettify -
http://code.google.com/p/google-code-prettify/
I prefer Syntax Highlighter implementations (I'm using Wordpress plugin implementation for my blog).
Advantages
It is based on JavaScript and does
not care about what you have on the
server.
Posts with this formatting display
properly on different RSS feeds and
can be copied to clipboard.
It is trivial to extend syntax
rules. I'm using that to highlight
custom operators in Boo-based DSL (see sample post)
Multiple languages are supported
out-of-the-box
(source: googlecode.com)
You can get JavaScript syntax-highlighting scripts, such as this one by Dean Edwards.
This is also a jQuery version apparently based on it which looks good.
CopySourceAsHtml is an add-in for Microsoft Visual Studio 2005 that allows you to copy source code, syntax highlighting, and line numbers as HTML.
http://copysourceashtml.codeplex.com
It's highly configurable, and works much better than the download page would make you expect! Don't know if there is something similar for VS 2008
If you don't have the ability to add the google prettifier CSS reference, this would be a better way to go, as what you get is a complete HTML with the required style. I use it all the time on our developers wiki, and loving it.
An even better solution, if you don't want to bother installing anything, is to just use the little web app I wrote called BlogTrog CodeWindow:
http://www.blogtrog.com
It's easy to use. Just paste your code and embed the results.