omz / Pythonista-Issues

Issue tracker for Pythonista (iOS)
164 stars 14 forks source link

Add CSS syntax highlighting #99

Open allanburleson opened 8 years ago

allanburleson commented 8 years ago

Since projects sometimes need CSS, CSS syntax highlighting would be nice to have and fairly easy to implement.

controversial commented 8 years ago

Syntax highlighting for lots of languages would be awesome. Aren't there any one-size-fits-all highlighters? Just pull 100 grammars in 😛

Phuket2 commented 8 years ago

I know this is not answer you are looking for and maybe it's no help at all. But you can use http://pygments.org/ lib (already installed in Pythonista) to do syntax hilighting in ui.WebView. Ok, it's not the editor.but it could be useful until this feature is added, if it is. Below is a pic of what i did just using the Python Lexer

jsbain commented 8 years ago

What is strange is that there IS a css syntax highlighter built into pythonista. OMCSSSyntaxHighlighter. This seems to come complete with a set of rules. I think possibly just the theme is not set up with the right names, or the mapping between rule names and theme names is not correct

omz commented 8 years ago

@jsbain There is some limited support for highlighting CSS in Pythonista, but it's currently only used for embedded style sheets. You'll notice that things between <style> tags have different highlighting in HTML files.