I am searching a syntax highlighter for iphone. I've search in this forum and in google, and I have found several answers, but I can't find the answer that I'm searching.
I want a library or a framework that can be imported to my project that includes syntax highlighting for the more languages possible, but the most important is objective-c. I would prefer if it's not in a UIWebView.
Sorry if the question isn't very exact, I'm pretty new in ios development, ask me by the comments if you need more information.
You may try OkudaKit or UKSyntaxColoredTextDocument.
Not sure if they will compile for iOS, but I think these are your best guesses...
Otherwise, try ParseKit, and do the syntax highlighting part yourself with NSAttributedString.
Related
Hi I am working on testing a mobile app that can generate a description about objects or scenes. Is there a way to check if the sentence generated by the app has the correct grammar/syntax? I am using Swift.
No, there is no built-in support for checking the grammar of a sentence in Swift, nor am I aware of anything like that built into iOS. English grammar is quite complex, and then there's the issue of supporting multiple languages. It's a non-trivial problem.
You might be able to find a third party grammar checking library. I suggest googling "iOS grammar checking framework" or similar.
I'm using Google Sites to share/store useful code snippets. Can anyone show me how I can make my code snippets look like this ?
I'd check out GeSHi, the Generic Syntax Highlighter. It has pretty good support for Objective C. I don't know if it'll work with Google Sites, though.
I'd like to use Easy Google Syntax Highlighter in my wordpress blog. Because often I will paste some java code in my blog. But I don't like the default style of Easy Google Syntax Highlighter, how can I use the eclipse java code style ?
Thanks
I recommend keeping an eye out for a good Pygments plugin for Wordpress.
The following URL is a blog post by Gwynne Raskind talking about a Pygments plugin she's made but has not released yet - it's currently pending clarification on licensing and the post was written just yesterday so it's definitely alive.
http://blog.darkrainfall.org/highlighting-source-code-in-wordpress-with-pygments/
EDIT: I know it's not "eclipse style" but to get Eclipse-style syntax highlighting you'll likely have to rewrite stuff on your own. Since Pygments highlighting is crazy-awesome I thought this might be a good alternative.
ANOTHER EDIT: If you use java, http://www.java2html.de/applet.html might be useful!
You may have to edit the language files, in the /Scripts folder. There appears to be no quick way to 'theme' it though and looking at the files it would be a time consuming process to edit the colors for each language.
i'm looking for a objective-c class that supports syntax hightlighting a string.
is there something like that existing?
this should work on iphone!
Firstly, it really depends on what programming language you need to process, so you should include that.
Secondly, while I don't know of any syntax highlighters that are written in C or ObjC, there are several written in JS. You could load up the code in a UIWebView and run the JS syntax highlighter on it. That would probably work pretty well.
You'll have to do this yourself, unfortunately. But if you check iPhone OS 3.2, there are some helpful bits in there. (There is an NDA in place, so more can't be revealed directly in this public area. Check out Apple's dev forums.)
Though CoreText precisely does what you want in Mac OS X, It's not yet available on iPhone OS 3.1.X. However, Syntax highlighting is far more easier if you use javascript based highlighter as pointed by Colin
I have some big documentation to do that will contain pieces of code I'd like to give the conventional "coding language" syntax highlighting. I've searched the styles feature to do such a thing, but there is no way to do that (in fact I could only found a forum where people were fighting about adding this feature or not, but this is not the point).
There is an abandoned extension for OpenOffice, but using it freezes my installation of OpenOffice.
What's the easiest way to do this? Should I try to recompile the extension and debug it (although I'm already having a hard time compiling another Java project), or maybe I should use a macro? How to implement this?
One possibility is to use one of the many code to html tools out there and then include the html in your OpenOffice document (using "File..." on the Insert menu).
One possibility is highlight. Vim has a :TOhtml command that will convert the current file to syntax highlighted html using the current colour scheme. I've not tried it, but this looks promising. There are also a few online ones, such as this. I'm sure there are a great many other options.