46

I like the vim Dark Blue style in Notepad++, but I want to use it with Lucida instead of Consolas. When I change the font to Lucida, it is never saved. Is there a way to save a custom style that combines a new font with a built-in style?

6 Answers 6

49

As @mikez302 said in a comment above, run as administrator. Then make your style changes via Settings/Style Configurator. There is no need to edit these files manually.

As of v5.8.6, theme files are stored under %PROGRAMFILES(x86)%. Vista/Win7 will refuse to write to this directory when the application is not run as Administrator. Furthermore, it appears that "Global Override" settings get saved into the active theme file. Hopefully future versions of Notepad++ will store these user-specific theme settings under %APPDATA% as the Windows paradigm intends.

3
  • This is the correct answer. Solved the problem for me.
    – endolith
    Mar 26, 2011 at 17:03
  • Spot on, solved my problem too. Great suggestion that these settings should go into user-writable territory.
    – poplitea
    Sep 2, 2011 at 13:35
  • 1
    Is there a workaround for those who do not have administrative privileges? Sep 3, 2014 at 14:45
15

Head over to Settings / Style Configurator. Select the font name and enable checkbox against Enable global font. Click on Save & Close.

image

Also: Have a look at @zourtney's answer. You should run Notepad++ as Administrator to keep your changes

3
  • 5
    Thanks for the answer. But when I change the font to Lucida as you explain; and check the Enable global font box; next time I open Notepad++ the font name is not in the Font name box and the file has Consolas as font. In fact, sometimes, it does not even open vim Dark Blue but a white background default style. So in short, every time I open Notepad++ I need to change the style to vim Dark Blue and font to Lucida. Changes I make to style are not saved. I may be doing something wrong, but I don't know what.
    – Zeynel
    Nov 25, 2010 at 18:16
  • 1
    @Zeynel Does this happen for different file extensions ? Can you try opening the same file multiple times and see if the font settings carry ?
    – Sathyajith Bhat
    Nov 26, 2010 at 23:36
  • @jumbo Thanks for letting me know - I've reuploaded the image
    – Sathyajith Bhat
    Oct 28, 2011 at 10:01
5

I'm having the same issue using the latest version (5.8.5).
I believe a bug report is in order. Here is a bug that seems to (at the very least) be related: http://sourceforge.net/tracker/index.php?func=detail&aid=2893679&group_id=95717&atid=612382

Another option (until the issue gets resolved) may be to manually add a theme to %PROGRAMFILES%\Notepad++\themes
(Note that you have to run your editor as Administrator to be able to save this file.)

Simply copy the theme you like, and edit the copy to your liking.
In your case, editing the fontName under <GlobalStyles> should do the trick.
Additionally you may want to edit name="stylerTheme" path="" in your %APPDATA%\Notepad++\config.xml file.

4
  • @studiohack: Not a problem at all. :-)
    – oKtosiTe
    Nov 26, 2010 at 19:20
  • I tried making a copy of the theme and saving it, and I got a dialog box saying "Please check whether if this file is opened in another program". Does anyone know what to do about this? I tried editing the file in a different editor and it wouldn't let me either. I am using Noetpad++ 5.8.6 on Windows 7. Jan 11, 2011 at 22:23
  • 4
    I was able to save the file by running Notepad++ as administrator. Jan 11, 2011 at 22:52
  • @mikez302: Good point. I forgot to mention that. Edited it in.
    – oKtosiTe
    Jan 14, 2011 at 17:19
3

Instead of running Notepad++ as administrator as in some of the other answers, you can add write/modify permissions to the themes directory in program files so you don't need to run as admin each time.

For windows 7:

  1. In Windows Explorer, go to %PROGRAMFILES%\Notepad++
  2. Right-click the 'themes' folder and click 'properties'
  3. Click the Security tab
  4. CLick the Edit button
  5. Select the 'Users' item in the upper list
  6. In the permissions list, add a checkmark to 'Modify' (which automatically adds it to 'write' as well)
  7. OK, OK

It should now save your changes without needing to run Notepad++ as admin.

1
  • Great hack! I didn't think of it. Saves having to run as admin each time and on corporate computers, you can get the admin to do it for you once, and you're set.
    – Sanoo
    Jul 3, 2016 at 14:28
2

Open the notepad++ by right clicking and selecting 'Run as Administrator' - and then make the changes you want to make. Your changes will be preserved.

0

If you do not have administrator rights, changing the entire theme to another theme (e.g. the Twilight theme) is saved permanently even without administrator rights.

Cross post from question here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .