LESS and CSS3 syntax highlighting

269

Solution 1

PSPad allows you to define "User highlighters". Although not quite as flexible as a full specification, you can at least define all the keywords (up to 3 categories) and reserved words you want highlighted. For LESS, you can get/edit a list of keywords from the existing CSS highlighter in the [Keywords] section from "CSS.DEF" in the "Context" directory inside the PSPad program folder -- you may also expand this list if you simply want support for the CSS3 keywords in the regular CSS highlighter.

You should then assign this user highlighter to one of the "<not assigned>" spots in the Highlighter Settings, following which you can select colours for the reserved words and 3 keyword categories.

With these user highlighters, nested brackets work just fine.

Note: since these files are stored in subfolders of the PSPad program folder, usually in C:\Program Files, Windows Vista and Windows 7 won't let you edit them unless you run PSPad as Administrator. Be sure to do this when you change any settings.

So, in summary:

  • Expand C:\Program Files\PSPad\Context\CSS.DEF for CSS3 properties
  • Create a user highlighter (with keywords from the above file) to be able to have syntax highlighting for LESS

Solution 2

Notepad++ also allows for user defined styles.

Here's a list of 50 languages that have already been made, as well as instructions for importing them. The link takes you to Less.js. And of course any other language you'd like to add/modify.

Cheers!

Share:
269

Related videos on Youtube

jrhamza
Author by

jrhamza

Updated on September 17, 2022

Comments

  • jrhamza
    jrhamza over 1 year

    I am facing an issue in AchartEngine Scatter chart in android. The line between each point, disappears when panning after set zoom to a level. I had tried hardwareAcceleration to false and setLayerType to null and all. But, issue remains.

    Achartengine version 1.1.0. Android device - Galaxy S4, S3. Can you please help me on this ?

    Screenshot is placed here at, http://i.stack.imgur.com/hq5r4.png

    Screenshot is pasted down - with no line between chart points Thanks

    JRH

    • Sebastian Paaske Tørholm
      Sebastian Paaske Tørholm almost 13 years
      The question you linked is about less, the unix file-viewer, where your question is about LESS, the stylesheet language. So not exactly similar questions. :)
    • mingos
      mingos almost 13 years
      Haha, indeed :D. I can't remember now (I wrote this question half a year ago...), I suppose I linked to a question I hadn't bothered to read carefully :D.
    • Dan D.
      Dan D. about 10 years
      Post some screenshots. The scatter chart has no lines to connect the points.
    • jrhamza
      jrhamza about 10 years
      Dan, I added the screenshot, can you please look into it?
    • Dan D.
      Dan D. about 10 years
      I still don't understand what line you miss in a scatter plot?
    • jrhamza
      jrhamza about 10 years
      Its a line chart, We used , (GraphicalView) ChartFactory.getLineChartView( getBaseContext(), dataset, multiRenderer);
    • jrhamza
      jrhamza about 10 years
      sorry for that, I given a wrong title for the question.
    • Dan D.
      Dan D. about 10 years
      I have no idea how to replicate the issue you have.
    • jrhamza
      jrhamza about 10 years