Jump to content


Photo

Zenburn-esque Notepad++ Theme


  • Please log in to reply
16 replies to this topic

#1 entropic

entropic
  • Members
  • 181 posts

Posted 06 February 2009 - 02:46 AM

Posted Image
Posted Image
Place it in your %A_AppData%\Notepad++\ folder (on XP this is C:\Documents and Settings\[UserName]\Application Data\Notepad++\)

It should be named UserDefineLang.xml. You can either add it to the one that is there or just replace it with this one, but if you do that you'll lose any other user-defined languages you have saved.

It isn't anywhere near perfect but I like it. I incorporated what some others had shared with the forum in the past.

Get it here: <!-- m -->http://www.mediafire.com/?xz2humdfdcx<!-- m -->
and the stylers.xml here: <!-- m -->http://www.mediafire.com/?tgtjnlcgdgn<!-- m -->

#2 Guests

  • Guests

Posted 19 February 2009 - 01:39 PM

Very nice but this post belongs to another forum section.

#3 fincs

fincs
  • Fellows
  • 1529 posts

Posted 19 February 2009 - 08:46 PM

I see you are using Windows Vista and displaying the Consolas font, isn't it? I also like Consolas :).

#4 entropic

entropic
  • Members
  • 181 posts

Posted 11 March 2009 - 10:58 PM

Sorry about posting it in the wrong section.

Also, I'm running XP, I just like Consolas :-)

#5 redgum

redgum
  • Members
  • 52 posts

Posted 03 April 2009 - 07:15 AM

Nice theme. But half of it is missing - do you have the stylers.xml file to go with the userDefinLang.xml file?

Thanks!

#6 entropic

entropic
  • Members
  • 181 posts

Posted 04 April 2009 - 02:22 AM

Here you go
Stylers.xml: <!-- m -->http://www.mediafire.com/?tgtjnlcgdgn<!-- m -->

#7 redgum

redgum
  • Members
  • 52 posts

Posted 04 April 2009 - 05:47 AM

Very sweet - thanks entropic!

#8 TheGood

TheGood
  • Members
  • 589 posts

Posted 04 April 2009 - 04:44 PM

Very nice! Thanks for sharing!
Much better on the eyes :)
Edit: Is there a way to make quoted strings "" have a different colour than variables?
Edit2: Also, how can I change the background colour of braces and parentheses when the caret is beside them (I want to replace the default white by a light gray)?
Edit3: How can I make the style take effect only for ahk documents? Right now I have a gray/black background for all documents (giving weird lexing for xml documents for example).

#9 redgum

redgum
  • Members
  • 52 posts

Posted 05 April 2009 - 05:58 AM

Very nice! Thanks for sharing!
Much better on the eyes :)
Edit: Is there a way to make quoted strings "" have a different colour than variables?
Edit2: Also, how can I change the background colour of braces and parentheses when the caret is beside them (I want to replace the default white by a light gray)?
Edit3: How can I make the style take effect only for ahk documents? Right now I have a gray/black background for all documents (giving weird lexing for xml documents for example).


1: View --> User Define Dialog... Variables are set in the 3rd Group section of the Keyword Lists tab, and strings in the Delimiter 1 section of the Operators tab. This dialog, BTW, writes to the userDefineLang.xml file.

2: Settings --> Style Configurator, Global Styles, Brace highlight style. This dialog writes to stylers.xml.

3: Bad news. Because AHK is a user defined language instead of a built-in language, it can't be selected in the Languages list in the Style Configurator, and from what I can tell, the only way to change the items for AHK is to change the Global Styles language - which applies globally, including xml, html etc. :( .

One option is to go to Global Styles, Global Override in the Configurator, check "Global background color", and set the background color to R/G/B = 31/31/31, which matches the background in entropic’s theme. This will set a dark background for all elements of all languages. The downside to this is that some of the text colors used for these other languages may not look good against this background – for example, the blue tag names in XML. To fix that, you’d need to tweak the colors of each language you plan on using, via the Style Configurator - select the appropriate language, then the elements defined for that language.

If anyone knows any easier ways, please let us know :) .

#10 TheGood

TheGood
  • Members
  • 589 posts

Posted 05 April 2009 - 02:40 PM

1: View --> User Define Dialog... Variables are set in the 3rd Group section of the Keyword Lists tab, and strings in the Delimiter 1 section of the Operators tab. This dialog, BTW, writes to the userDefineLang.xml file.

2: Settings --> Style Configurator, Global Styles, Brace highlight style. This dialog writes to stylers.xml.


Thanks!

3: Bad news. Because AHK is a user defined language instead of a built-in language, it can't be selected in the Languages list in the Style Configurator, and from what I can tell, the only way to change the items for AHK is to change the Global Styles language - which applies globally, including xml, html etc. :( .


I understand. But from what I can see, even built-in languages don't have the option to change the background colour of the Scintilla control or the caret colour or the line number margin colours, etc... So, it wouldn't help even if AHK was a built-in language right? We would still have to use the Global Style to change those things to our liking.

What I'm thinking of doing is to use a portable version of NPP with the theme just for AHK, and put the original NPP back to normal.

Edit: Also, I can't get hex numbers to format properly. I have "0x" in the 4th group in prefix mode, but it still does not colour hex numbers in the designated colour (although other items in the group do get coloured, like Shift, Alt, etc...)

#11 redgum

redgum
  • Members
  • 52 posts

Posted 05 April 2009 - 07:55 PM

I understand. But from what I can see, even built-in languages don't have the option to change the background colour of the Scintilla control or the caret colour or the line number margin colours, etc... So, it wouldn't help even if AHK was a built-in language right? We would still have to use the Global Style to change those things to our liking.

Good point.

What I'm thinking of doing is to use a portable version of NPP with the theme just for AHK, and put the original NPP back to normal.

That would work, particularly if you don't use NPP much in other languages. Otherwise, might be worth doing the little bit of tweaking needed to those other languages. I've saved some custom colors in the More Colors dialog, all of which work well with the dark background, and just replace poor colors with these when I come across them.

Edit: Also, I can't get hex numbers to format properly. I have "0x" in the 4th group in prefix mode, but it still does not colour hex numbers in the designated colour (although other items in the group do get coloured, like Shift, Alt, etc...)

I don't know a way around this. It seems to use a strict left-to-right style precedence; once it finds the leading 0 of the hex number, it's deemed a number, regardless of what follows.

#12 TheGood

TheGood
  • Members
  • 589 posts

Posted 06 April 2009 - 06:47 PM

OK, I "found" a way around it.
I added a little script to the shortcut I use to launch Notepad++ which changes the stylers.xml and userDefineLang.xml files if a modifier key is pressed (I use Ctrl). Assuming the other set of files between which you want to alternate are named stylers.xml.bak and userDefineLang.xml.bak, then the following script will work:

    ;Check if the Ctrl key is down
    If GetKeyState("Ctrl", "P") {
        ;We need to switch the style
        
        ;Close all open Notepad++ windows first
        While WinExist("ahk_class Notepad\+\+") {
            h := WinExist("ahk_class Notepad\+\+")
            WinClose, ahk_id %h%    ;Send a close message
            WinWaitClose, ahk_id %h%    ;Wait for the window to close
        }
        
        ;Keep current working dir and set current directory to be the Notepad++ appdata folder
        s := A_WorkingDir
        SetWorkingDir, %A_AppData%\Notepad++
        
        ;Rename current stylers.xml and userDefineLang.xml to a backup version
        FileMove, stylers.xml, stylers.xml.bak2
        FileMove, userDefineLang.xml, userDefineLang.xml.bak2
        
        ;Rename the backed up version to set in place
        FileMove, stylers.xml.bak, stylers.xml
        FileMove, userDefineLang.xml.bak, userDefineLang.xml
        
        ;Rename the now backup version properly
        FileMove, stylers.xml.bak2, stylers.xml.bak
        FileMove, userDefineLang.xml.bak2, userDefineLang.xml.bak
        
        ;Restore previous working dir
        SetWorkingDir, %s%
    }

It's actually very convenient since Notepad++ opens up so fast anyways! :D

#13 entropic

entropic
  • Members
  • 181 posts

Posted 06 April 2009 - 10:45 PM

Very cool, thanks TheGood.

#14 redgum

redgum
  • Members
  • 52 posts

Posted 07 April 2009 - 04:49 AM

OK, I "found" a way around it.
I added a little script to the shortcut I use to launch Notepad++ which changes the stylers.xml and userDefineLang.xml files if a modifier key is pressed (I use Ctrl).

An ingenious solution! I’d never have thought of running a script at program instantiation.

Another option would be to have two portable installations, each with their own config files. They’d have their own shortcuts, and include the “ -multiInst” switch to allow multiple instances of Notepad++ to run at once. That way you could have both open simultaneously.

#15 maestro

maestro
  • Guests

Posted 10 January 2010 - 11:36 PM

thank You, nice work