less / less.js

Less. The dynamic stylesheet language.
http://lesscss.org
Apache License 2.0
16.99k stars 3.41k forks source link

[Feature Request] Notepad++ Style Theme #586

Closed HenryTheVacuum closed 12 years ago

HenryTheVacuum commented 12 years ago

Notepad++ is a very popular editor... however there is no style theme to properly highlight syntax because LESS files include both JS and CSS. If you add the .LESS extension to the .CSS style configuration some of the highlighting is proper, however nesting etc. messes it up.

I realize this isn't a priority but you never know if any trolls might have a link to one someone has made.

Thanks.

Anahkiasen commented 12 years ago

I don't know much about themes, but Eclipse/Aptana have SASS color syntaxing which can be used for LESS files. Isn't there a way to adapt it for Notepadd++ ? I've heard of themes being ported from one editor to another so...

marklagendijk commented 12 years ago

Actually this already exists. Just install the LESS.js User Defined Language file found on this page: http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=User_Defined_Language_Files

HenryTheVacuum commented 12 years ago

I've looked at that and it only provides a global override which makes all of the text black for any language... no special highlighting unfortunately. I'll continue to dig around.

marklagendijk commented 12 years ago

Please never post an answer like that again. It is really frustrating when you: -give someone the right solution to their problem -> -they fail to use your solution -> -they conclude that it must be you who is wrong

Anyway, I do know that the LESS.js User Defined Language file for Notepad++ does work. I have been using it myself for quite some time now. Did you follow the instructions for installing it? I'll add them here just to be sure.

First download the 'LESS.js' language file from the list. Then follow the instructions found below the list:

To add syntax colouring from one of these:

  1. Unpack to an .xml file, if zipped;
  2. If you don't have an userDefineLang.xml file already, you can drop this file among your other configuration file, in the Notepad++ Install Folder. It'should be named userDefineLang.xml.
  3. Otherwise, open both the existing and new file.
    1. Select all of the new file, copy, and paste at the end of the current file.
    2. This will have created a spurious pair i the middle, each tag on a line by itself. Remove these two consecutive lines.
    3. Close Notepad++.

Your Languages menu will show the newly added language at the bottom, next time you launch Notepad++.

Note: if adding the userDefineLang.xml file to the Program Files directory of Notepad++ doesn't work, try adding it '%APPDATA%\Notepad++'.

HenryTheVacuum commented 12 years ago

I now realize you MUST rename the file from userDefineLang_LESS.xml to userDefineLang.xml. The import feature in Notepad++ works once you rename the file.

This little hickup might answer someone else with the same initial problem.

Thanks a bunch.

azrafe7 commented 11 years ago

I used that LESS.js and added some stuff to it. It can be found over here https://github.com/azrafe7/LESS-for-Notepad-plusplus if you're interested.

lukeapage commented 11 years ago

@azrafe7 Thanks, maybe you'd like to add to the wiki here https://github.com/cloudhead/less.js/wiki/Editors-and-Plugins

azrafe7 commented 11 years ago

@lukeapage Sure... done!